Running Docker on EC2 Ubuntu

Ubuntu doesn’t come natively shipped with Docker.

If you need to use Ubuntu, you can run the following commands to get it installed on your EC2 instance, in this order:


Sudo yum install git


sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
sudo curl -L$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Running it:

Git clone branch
sudo which docker-compose up

Alternatively, you can look at using Core OS, which gets shipped with Docker installed.

Are you here because you realized RHEL8 stopped supporting Docker natively because of the cgroups v2 change? Well Podman is your next alternative, until Docker updates their innerds to support the new change!

Leave a Reply

Your email address will not be published. Required fields are marked *