Hi hope you are doing well, lets learn about “How to Setup and Install Docker on Linux Mint 20”, the Docker is the fastest growing technology in the IT market. Docker is the container technology.
Many industries are moving towards docker from the normal EC2 instances. It is PAAS (Platform as a Service), which uses a OS virtualisation to deliver software in packages called containers.
The containers are the bundle of the packages, library files, and some configuration files. It was first started in 2013 and developed by Docker, Inc.
So lets have the Setup of Docker CE on Linux Mint 20. Step by Step Guide.
Setup and Install Docker CE on Linux Mint 20
STEP 1: Update the Repository for the Docker to setup and Install on Linux Mint 20.
So firstly we will update the repository and install some of packages with the apt command.
$ sudo apt update
Let’s add the Docker’s official GPG key:
$ 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 $(. /etc/os-release; echo "$UBUNTU_CODENAME") stable"
$ sudo apt update
Now update the repository for the docker and Install Docker on Linux Mint 20.
STEP 2: Setup and Install Docker CE on Linux Mint 20 via apt command.
So, install docker-ce, docker-ce-cli and container.io packages in Linux Mint.
$ sudo apt-get -y install docker-ce docker-ce-cli containerd.io
Once the docker installation get’s completed , check the status of services for the docker and enable it after rebooting the System.
$ sudo systemctl status docker.service
So we have check the status for docker, and it is active running on the Linux Mint 20, so enable the service for docker at the time of booting.
$ sudo systemctl enable docker.service
STEP 3: Add the User in Docker Group.
Now lets add user “tastethelinux” into the docker group.
$ sudo usermod -aG docker $USER
“$USER” is the username tastethelinux, you can use whoami to check the username.
Docker version 20.10.8, build 3967b7d
So then check version using docker command without sudo, you will get the version for the docker.
Let’s check the installation with the docker info command, which gives the information about the Docker.
$ docker info
So we have successfully install Docker CE on Linux Mint 20, lets create a Container for the MongoDB.
STEP 4: Test Docker by Pulling Images.
So here we will create a container for MongoDB on docker, let’s use the pull command to pull the MongoDB image first.
$ docker pull mongo
So we have pulled the images for mongo from the docker, Once it’s completed you can check the image by using “docker images”.
$ docker images
STEP 5: Run Docker Container in Linux Mint 20.
Now let’s run the docker container by using docker run command.
$ docker run -d mongo
So we have successfully run the docker container in Linux Mint 20 for MongoDB, now if we have to verify the container is running or not use “docker ps” command.
$ docker ps
Run the container for MongoDB server on Linux Mint 20.
If you want to install MongoDB on EC2 instances follow the link, Install Docker on CentOS 8, Want to Install Docker CE on Rocky linux 8, Install Docker Compose on Rocky Linux 8, Install Docker on CentOS 7, Install Docker on Ubuntu 20. Thanks to Read the article. Keep Supporting US.