How to Run Docker on Linux Mint LMDE?


Docker is the best choice to automate a wide range of tasks. It provides a platform to deploy web applications, a suitable environment for implementing a microservices architecture, and DevOps tools. With Docker, you can containerize your application packages along with their required dependencies into lightweight containers. The main advantage of these isolated containers is that can be used or run across different environments.

The main purpose of this article is to guide you on how to install and run Docker, the widely used containerization platform, on Linux Mint LMDE.

How to Run Docker on Linux Mint LMDE?

To set up and run Docker on Linux Mint LMDE, you can follow these simple steps.

Step 1: Update and Upgrade System Package

Run the below single-line command to update as well as upgrade the systems files of Linux Mint LMDE:

sudo apt update && sudo apt upgrade -y

As per the above screenshot, your Linux Mint LMDE is up to date with the upgraded version of the installed packages.

Step 2: Install Dependencies

Docker will require dependencies while working in Linux Mint LMDE. Therefore, you need to install the required dependencies and library files using the command given below:

sudo apt install -y apt-transport-https ca-certificates curl software-properties-common

Based on the above-mentioned snapshot, the required dependencies have been installed on your Linux Mint LMDE, successfully.

Step 3: Add GPG Key for Docker

To ensure the authenticity and refer to a trusted source for downloading Docker, add the GPG key using the following command:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

The above command added Docker’s GPG key as a keyring file in the specified location on your Ubuntu Linux system.

Step 4: Add Repository on Linux Mint LMDE

Run the following command from your Linux Mint LMDE terminal to add the Docker repository to the system package source. It will help to manage Docker installation easily:

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu focal stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

The command returning with an empty output indicates that the command successfully added Docker’s package repository to software sources.

Step 5: Update System Package

To save and apply changes, repeat the update command from the terminal:

sudo apt update

After executing the “apt update” command, the system is updated with the newly installed packages, as shown above.

Step 6: Install Docker on Linux Mint LMDE

Once the environment setup process has finished, the command given below will ensure to install the Docker packages on Linux Mint LMDE:

sudo apt install -y docker-ce docker-ce-cli containerd.io

The above command installs Docker’s necessary packages on your Linux system without prompting for confirmation.

Step 7: Confirm Docker Installation

To confirm whether Docker is installed on your Linux Mint LMDE or not, the “–version” option can be used with the “docker” command:

docker --version

The above output shows that Docker’s installed version is 24.0.2 on the system.

Step 8: Run Docker

To ensure the Docker container is installed and working properly, run the command as mentioned below:

docker run hello-world

Oops! An error occurred during the run of the docker container. It means the current user does have not proper permission to access the Docker daemon. To fix this kind of error, refer to Step 9 and Step 10.

Step 9: Change Ownership of Docker

To fix the permission issue, change the ownership of the Docker daemon socket to allow the user to access the Docker:

sudo chown $USER:$USER /var/run/docker.sock

Step 10: Permission to Allow Read and Write

Allow full access to all users on the system using the following command:

sudo chmod 666 /var/run/docker.sock

Step 11: Restart Docker Service

Open the Linux Mint LMDE terminal and execute the following command to restart the Docker services:

sudo service docker restart

An empty output demonstrates that the command successfully executed and restarted the Docker services.

Step 12: Test the Docker

Execute the following command will check and verify if the Docker is installed and working perfectly:

docker run hello-world

The above output result “Hello from Docker!” confirms that the Docker is installed and working properly on your Linux Mint LMDE.

Conclusion

You can easily install and run Docker on Linux Mint LMDE. Docker is a widely used containerization platform to deploy and manage applications. To install the docker on Linux Mint LMDE, you need first to set the environment by adding a repository and GPG key and install the required dependencies. Then, execute “apt install -y docker-ce docker-ce-cli containerd.io”, to install the Docker on your system. In this write-up, you have learned how to use Docker on Linux Mint LMDE.

Print Friendly, PDF & Email
Categories