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