Created
March 11, 2022 15:52
-
-
Save ChOkO08/e909061e25d5bda95877d3b5e8f084a7 to your computer and use it in GitHub Desktop.
Docker user-data for Ubuntu
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 | |
apt update -y | |
DEBIAN_FRONTEND=noninteractive apt install apt-transport-https ca-certificates curl software-properties-common -y | |
curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add - | |
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu" | |
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" | |
apt update -y | |
DEBIAN_FRONTEND=noninteractive apt install docker-ce -y | |
curl -L "https://github.com/docker/compose/releases/download/1.21.2/docker-compose-Linux-x86_64" -o /usr/local/bin/docker-compose | |
chmod +x "/usr/local/bin/docker-compose" | |
service docker start | |
usermod -a -G docker ubuntu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment