Skip to content

Instantly share code, notes, and snippets.

@ozooxo
Last active June 18, 2019 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozooxo/2c56e6a3141e393f916afffef00dac67 to your computer and use it in GitHub Desktop.
Save ozooxo/2c56e6a3141e393f916afffef00dac67 to your computer and use it in GitHub Desktop.
Setup a dev docker environment on AWS

Basically just spawn a new EC2 instance. I choose ubuntu 18.04 server, as Amazon 2 ECS optimized image doesn't have free tier. Log into the instance by

$ ssh ubuntu@<ec2-instance-ip>

No need to install git. But to make git clone works (even for public repo) I need to add my RSA key in this EC2 instance to github. Just follow this link to do so.

Follow this link to install docker.

For some unknown reason (probably because the ubuntu user have some special setup) then docker run hello-world works but docker ps not. sudo usermod -aG docker $USER doesn't help. Switch session to the docker group makes things work:

$ newgrp - docker
$ docker ps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment