Last active
April 19, 2020 06:10
-
-
Save syuntoku14/949c8cb26968fa60a8c571e6510e5ac9 to your computer and use it in GitHub Desktop.
install docker, tmux and mosh on a headless server
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/bash | |
sudo apt update && sudo apt upgrade -y | |
# install tmux and mosh | |
sudo apt install tmux mosh curl | |
# install docker | |
# sudo apt install nvidia-container-toolkit # uncomment if you want to use gpus | |
sudo curl -fsSL https://get.docker.com -o get-docker.sh | |
sudo sh get-docker.sh | |
sudo systemctl start docker | |
sudo apt install -y python3-pip | |
# install xvfb and opengl | |
sudo apt install -y python-opengl xvfb | |
# install doceker-compose | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
sudo curl -L https://raw.githubusercontent.com/docker/compose/1.23.1/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose | |
echo "if [ -f /opt/local/etc/profile.d/bash_completion.sh ]; then" >> ~/.bashrc | |
echo " . /opt/local/etc/profile.d/bash_completion.sh" >> ~/.bashrc | |
echo "fi" >> ~/.bashrc | |
source ~/.bashrc | |
# Enable to use docker without sudo | |
sudo groupadd docker | |
sudo gpasswd -a $USER docker | |
sudo systemctl restart docker | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment