Setting up an EC2 instance to run a Docker container

To run a Docker container on an EC2 instance, we first have to set up an instance with a Docker installation and add an ec2-user to the Docker group so that we can execute Docker commands with an ec2-user rather than as a root user, which we will be covering in this recipe.

Get Go Web Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.