Last active
December 9, 2020 15:35
-
-
Save x-projs/7ed83ff3cbab5f370e78a61b16872066 to your computer and use it in GitHub Desktop.
ubuntu-init.sh
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
# Create swap file | |
sudo fallocate -l 1G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
echo '/swapfile none swap sw 0 0' >> /etc/fstab | |
sudo apt update | |
sudo apt dist-upgrade -y | |
sudo apt install -y docker.io | |
sudo systemctl enable --now docker | |
echo "alias d='sudo docker'" >> ~/.profile | |
echo "alias dr='d run -p 80:80 -p 443:443 -d --restart always'" >> ~/.profile | |
source ~/.profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment