-
-
Save ali-master/17ea9c4cf50591791e75e997b04b7855 to your computer and use it in GitHub Desktop.
Ubuntu 22.04 docker and docker-compose install
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
sudo sysctl -w vm.max_map_count=262144 | |
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 `lsb_release -cs` stable" | |
sudo apt update -y | |
sudo apt install docker-ce -y | |
# Docker-compose | |
mkdir -p ~/.docker/cli-plugins/ | |
curl -SL https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose | |
chmod +x ~/.docker/cli-plugins/docker-compose | |
docker compose version | |
sudo usermod -aG docker $(whoami) | |
#Restart session after last command | |
#sudo apt-get install ca-certificates curl gnupg | |
#sudo install -m 0755 -d /etc/apt/keyrings | |
#curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
#sudo chmod a+r /etc/apt/keyrings/docker.gpg | |
#echo \ | |
# "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ | |
# "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ | |
# sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
#sudo usermod -aG docker $(whoami) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment