Last active
February 11, 2021 06:51
-
-
Save j-brn/f8f5fbf12459d0ac3cd4458eaf57056d to your computer and use it in GitHub Desktop.
CloudInit configuration for which confgures a debian 9 instance and installs docker on it
This file contains hidden or 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 | |
| users: | |
| - name: admin | |
| ssh-authorized_keys: | |
| - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG3eO5g2TPLcE3pzt/6XiGqGjbAeCr41s+5mSR0aZuHt jonas@thinkpad-jb | |
| sudo: ['ALL=(ALL) NOPASSWD:ALL'] | |
| groups: | |
| - sudo | |
| - docker | |
| shell: /bin/bash | |
| package_upgrade: true | |
| packages: | |
| - vim | |
| - apt-transport-https | |
| - ca-certificates | |
| - curl | |
| - gnupg2 | |
| - software-properties-common | |
| runcmd: | |
| - curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - | |
| - add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | |
| - apt-get update -y | |
| - apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose | |
| write_files: | |
| - path: /etc/ssh/sshd_config | |
| content: | | |
| Protocol 2 | |
| Port 222 | |
| HostKey /etc/ssh/ssh_host_rsa_key | |
| HostKey /etc/ssh/ssh_host_ecdsa_key | |
| HostKey /etc/ssh/ssh_host_ed25519_key | |
| SyslogFacility AUTH | |
| LogLevel INFO | |
| PermitRootLogin no | |
| StrictModes yes | |
| IgnoreRhosts yes | |
| PubkeyAuthentication yes | |
| PasswordAuthentication no | |
| ChallengeResponseAuthentication no | |
| UsePAM yes | |
| X11Forwarding no | |
| PrintMotd no | |
| AcceptEnv LANG LC_* | |
| Subsystem sftp /usr/lib/openssh/sftp-server | |
| AllowUsers admin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment