Last active
March 5, 2022 00:44
-
-
Save aaronromeo/a683c9810aad108fab2ae6b3bc583372 to your computer and use it in GitHub Desktop.
Digital Ocean Scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Use this as the command for the user script | |
# curl https://gist.githubusercontent.com/aaronromeo/a683c9810aad108fab2ae6b3bc583372/raw/medusa.sh | sh | |
# add docker | |
sudo apt update | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" | |
sudo apt update | |
apt-cache policy docker-ce | |
sudo apt install --assume-yes docker-ce | |
sudo systemctl status docker | |
# create a code-server user | |
adduser --disabled-password --gecos "" medusa | |
echo "medusa ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/medusa | |
usermod -aG sudo medusa | |
# copy ssh keys from root | |
cp -r /root/.ssh /home/medusa/.ssh | |
chown -R medusa:medusa /home/medusa/.ssh | |
sudo usermod -aG docker medusa | |
su - medusa | |
id -nG | |
sudo apt-get install --assume-yes apache2-utils |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment