Last active
December 16, 2017 18:44
-
-
Save tsertkov/7c86f1a8a07e58f21fec7c96fbfd94d1 to your computer and use it in GitHub Desktop.
Cloud-config for amzn2-ami provisioning docker env
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 | |
package_upgrade: true | |
packages: | |
- docker | |
- python2-pip | |
write_files: | |
- path: /etc/systemd/system/docker.service.d/aws-credentials.conf | |
content: | | |
[Service] | |
Environment="AWS_ACCESS_KEY_ID=<key>" | |
Environment="AWS_SECRET_ACCESS_KEY=<secret>" | |
runcmd: | |
- pip install docker-compose | |
- systemctl enable --now docker.service | |
- usermod -a -G docker ec2-user | |
- systemctl daemon-reload | |
- service docker restart |
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 | |
package_upgrade: true | |
packages: | |
- docker | |
- python2-pip | |
runcmd: | |
- pip install docker-compose | |
- systemctl enable --now docker.service | |
- usermod -a -G docker ec2-user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment