Last active
April 30, 2020 22:27
-
-
Save niradler/db3cc031edb223a880b9818be16e2498 to your computer and use it in GitHub Desktop.
startup script to setup new vm with docker and docker compose.
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
sudo apt update | |
sudo apt upgrade | |
free -h | |
df -h | |
sudo fallocate -l 1G /swapfile | |
ls -lh /swapfile | |
sudo chmod 600 /swapfile | |
ls -lh /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo swapon --show | |
sudo cp /etc/fstab /etc/fstab.bak | |
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab | |
sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common | |
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | |
sudo apt update | |
apt-cache policy docker-ce | |
sudo apt install docker-ce | |
sudo systemctl status docker | |
sudo curl -L https://github.com/docker/compose/releases/download/1.25.5/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment