Skip to content

Instantly share code, notes, and snippets.

@ratulSharker
Created August 23, 2022 18:05
Show Gist options
  • Save ratulSharker/cf7b420d2d5938618fceb685a20d31d7 to your computer and use it in GitHub Desktop.
Save ratulSharker/cf7b420d2d5938618fceb685a20d31d7 to your computer and use it in GitHub Desktop.
Installing docker, docker-compose into linux
# Installing Git
sudo apt install git
# Update the local packages
sudo apt-get update
sudo apt full-upgrade
# Installing docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Including non-root user (current user to be exact) account to the docker group
sudo usermod -aG docker ${USER}
# Check current user is included in the docker group
groups ${USER}
# Restart so that the adding in the group applied properly
sudo reboot -h
# Testing docker
docker --version
docker run hello-world
# Installing docker-compose
sudo apt-get install libffi-dev libssl-dev python3-dev python3 python3-pip
sudo pip3 install docker-compose
# Upon system reboot, container with relaunch policy will start docker, unless stopped while running
sudo systemctl enable docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment