Reputation: 205
I'm looking to automate the provisioning of an EC2 instance that will run docker and a specific container by default when the machine comes up. I have been using Amazon's ECS AMI, but am wondering if there's a better one out there that has Docker pre-installed. Does anyone have experience using another AMI from the marketplace?
Upvotes: 8
Views: 19687
Reputation: 2566
the easiest option is passing the script via User data(other wise just run it manually when connecting to the instance) section while creating a new EC2 machine.
yum update -y
amazon-linux-extras install docker
service docker start
usermod -a -G docker ec2-user
chkconfig docker on
just as a note this refer to the amazon linux AMI(default), just check for the instruction of your AMI and change accordingly
Upvotes: 3
Reputation: 67
When choosing an AMI at instance launch, searching "docker" or "deep learning" will turn up deep learning AMIs that come with Docker installed.
Upvotes: 0
Reputation: 9078
I stumbled across this question while researching the same question. I haven't found any existing AMIs that come pre-configured with Docker, although I'm sure. A deeper search will find one. However, you can also create your own AMI. It isn't at all difficult and only takes a few minutes.
In short: launch an EC2 instance with your favorite flavor of Linux. Install and configure your base Jenkins, and then follow these pretty simple directions to create a custom AMI.
Upvotes: 2