Last active
June 14, 2022 12:51
-
-
Save sigismund/b5b79633e41206ec1e21e9d1cf4ce7e6 to your computer and use it in GitHub Desktop.
Install latest docker and docker-compose on Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
DOCKER_COMPOSE_VERSION="2.6.0" | |
# Alternatively you can use the official docker install script | |
wget -qO- https://get.docker.com/ | sh | |
# Install docker-compose | |
sudo sh -c "curl -L "https://github.com/docker/compose/releases/download/v2.6.0/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose > /etc/bash_completion.d/docker-compose" | |
sudo chmod +x /usr/local/bin/docker-compose | |
sudo sh -c "curl -L https://raw.githubusercontent.com/docker/compose/$DOCKER_COMPOSE_VERSION/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose" | |
# Add user to docker group | |
sudo usermod -aG docker $USER | |
newgrp docker | |
echo "Relogin/restart if you can't connect to docker socket." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment