Docker Installation

Search for a command to run...

No comments yet. Be the first to comment.
API (Application Programming Interface) security is critical for protecting sensitive data and maintaining the integrity of systems and applications. APIs are used to connect different systems and applications, and as a result, they can provide a gat...

Well after months of deep slumber, away from social media networks, I had to return to Pune and adapt to hybrid working. I was browsing through meetup.com and was intrigued by one event from AWS user group Pune. It is AWS Reinvent 2022 -Recap on 21st...

Episode 2

Simplify Access Control and Enhance Transparency Over Your ML Projects

Episode 1

Docker can be installed on Linux, Windows and Mac.
Let's see the installation steps on Ubuntu.
To install Docker Engine, 64-bit version of one of the below Ubuntu versions is required:
Ubuntu Jammy 22.04 (LTS)
Ubuntu Impish 21.10
Ubuntu Focal 20.04 (LTS)
Ubuntu Bionic 18.04 (LTS)
Set up the repository and then install the Docker Engine, CLI, Containerd, and Docker Compose packages.
sudo apt-get update
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
The script will be downloaded from get.docker.com and runs it to install the latest stable release of Docker on Linux.
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo docker --version
By default, only the root user can connect to the docker daemon by cli. If you want any other user to run docker commands then you need to add the user into the docker group.
If you would like to use Docker as a non-root user, you should add your user to the “docker” group with below command.
sudo usermod -aG docker username
Example: In the above step, 'username' is replaced by 'vagrant'.
sudo usermod -aG docker vagrant
sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd