Created
June 23, 2021 02:25
-
-
Save braidn/c48bc0aaaa3c680bd0ec9eee25d39e44 to your computer and use it in GitHub Desktop.
Cloud init for setting up Docker
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
#cloud-config | |
groups: | |
- docker | |
users: | |
- default | |
- name: dockeradm | |
sudo: ALL=(ALL) NOPASSWD:ALL | |
groups: users, docker | |
ssh_authorized_keys: | |
- ssh-rsa yourPublicSSHKey | |
package_update: true | |
packages: | |
- apt-transport-https | |
- ca-certificates | |
- curl | |
- gnupg-agent | |
- software-properties-common | |
runcmd: | |
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | |
- add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
- apt-get update -y | |
- apt-get install -y docker-ce docker-ce-cli containerd.io | |
- systemctl start docker | |
- systemctl enable docker | |
final_message: "The system is finally up, after $UPTIME seconds" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment