Skip to content

Instantly share code, notes, and snippets.

@mostafa6765
Last active April 21, 2021 12:48
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 mostafa6765/b781836545227e1198add7a68694c3ea to your computer and use it in GitHub Desktop.
Save mostafa6765/b781836545227e1198add7a68694c3ea to your computer and use it in GitHub Desktop.
docker install on aws ec2

Docker install aws ec2:

  1. The first step is to add the GPG key for the official Docker repository:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository "deb [arch=amd64]"

https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable

  1. apt

sudo apt-get update

sudo apt-get install -y docker-ce

docker info

nb: if get server error

sudo chmod 666 /var/run/docker.sock

~ docker-compose install

sudo apt install docker-compose

~ root privileges (sudo)

sudo usermod -aG docker ec2-user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment