Skip to content

Instantly share code, notes, and snippets.

@mrroot5
Last active February 6, 2020 11:16
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 mrroot5/7d4505d2238caeea3f79d125e598ed1a to your computer and use it in GitHub Desktop.
Save mrroot5/7d4505d2238caeea3f79d125e598ed1a to your computer and use it in GitHub Desktop.
Instalar docker y docker-compose en Ubuntu

Installation

Fast guide only with commands.

Docker && docker-compose installation with apt in Ubuntu 18.04

  • Required steps:
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
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 bionic stable"
sudo apt update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo docker run hello-world
  • Use docker without root:
sudo usermod -aG docker ${USER}
# Reload permissions avoiding logout
su - ${USER}
id -nG
docker run hello-world

Docker & docker-compose installation with snap in Ubuntu 18.04

This method could be a little tricky if you need to change DNS or another docker sysmtd customization. Also it could be a problem with kubernetes minikube. Check their docs for more info.

sudo snap install docker --classic
docker run hello-world

docker snap: Cannot connect to the Docker daemon

From this stackoverflow question. We have this answer.

Docs

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