Skip to content

Instantly share code, notes, and snippets.

@elvisgiv
Last active January 4, 2021 13:39
Show Gist options
  • Save elvisgiv/cbed66089cc4e3e00295242c9e5063f8 to your computer and use it in GitHub Desktop.
Save elvisgiv/cbed66089cc4e3e00295242c9e5063f8 to your computer and use it in GitHub Desktop.

install docker and docker-compose

https://docs.docker.com/compose/install/

curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

launch docker without sudo

First, we must create the docker group:

sudo groupadd docker

Then, add your current user to the docker group:

sudo gpasswd -a ${USER} docker

Now you can restart the Docker daemon:

sudo service docker restart

Now you should be able to run it without sudo:

docker run hello-world

If you have any problem, try logging out/in or rebooting your machine.

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