{"id":24471,"date":"2024-01-31T15:55:57","date_gmt":"2024-01-31T15:55:57","guid":{"rendered":"https:\/\/linuxways.net\/?p=24471"},"modified":"2024-01-31T15:58:37","modified_gmt":"2024-01-31T15:58:37","slug":"how-to-install-docker-on-linux-mint-21","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/mint\/how-to-install-docker-on-linux-mint-21\/","title":{"rendered":"How to Install Docker on Linux Mint 21"},"content":{"rendered":"<p><strong>Docker <\/strong>is a well-known containerization forum that enables users to containerize or package their desired application along with all dependencies. It helps users to easily deploy\/build and run their applications seamlessly across various environments. If you are working on the Linux Mint system and want to package your required applications into a container, you can install <strong>Docker<\/strong>. It will permit you to build and handle containers for your necessary applications.<\/p>\n<p>This guide will illustrate all the possible ways to install <strong>Docker <\/strong>on your Linux Mint system.<\/p>\n<p><strong>Quick Outline<\/strong><\/p>\n<ul>\n<li><a href=\"#post-24471-5594fll70t2h\"><strong>How to Install Docker on Linux Mint 21<\/strong><\/a><\/li>\n<li><a href=\"#post-24471-7yl9wgrm1z5e\"><strong>How to Use Docker as a Regular User on Linux Mint 21<\/strong><\/a><\/li>\n<li><a href=\"#post-24471-ve2uwmmlred8\"><strong>How to Uninstall\/Remove Docker From Linux Mint 21<\/strong><\/a><\/li>\n<li><a href=\"#post-24471-gdks2c1jpry\"><strong>Conclusion<\/strong><\/a><\/li>\n<\/ul>\n<h2><a id=\"post-24471-5594fll70t2h\"><\/a>How to Install Docker on Linux Mint 21<\/h2>\n<p>In Linux Mint, you can use the following methods to install <strong>Docker <\/strong>on your system:<\/p>\n<ul>\n<li><a href=\"#post-24471-94spmkp6hykn\"><strong>Method 1: Default Linux Mint Repository <\/strong><\/a><\/li>\n<li><a href=\"#post-24471-k7a9fkxxtwi6\"><strong>Method 2: Official Docker Repository <\/strong><\/a><\/li>\n<li><a href=\"#post-24471-4qial7bk8ha\"><strong>Method 3: Deb File<\/strong><\/a><\/li>\n<li><a href=\"#post-24471-5oc7parreyk9\"><strong>Method 4: Shell Script<\/strong><\/a><\/li>\n<li><a href=\"#post-24471-j4tpib48z1m9\"><strong>Method 5: Snap Store<\/strong><\/a><\/li>\n<\/ul>\n<h3><a id=\"post-24471-94spmkp6hykn\"><\/a>Method 1: Default Linux Mint Repository<\/h3>\n<p>The Official Linux Mint repository contains a list of various <strong>Docker <\/strong>packages that can be installed via the \u201c<strong>apt<\/strong>\u201d command. The easiest way to install <strong>Docker <\/strong>is using the default Linux Mint repository but it does not install its latest version.<\/p>\n<p>To install <strong>Docker <\/strong>on Linux Mint from the default Linux Mint repository, you can use the provided steps:<\/p>\n<p><strong>Step 1: Update System Packages <\/strong><\/p>\n<p>First, update the Linux Mint packages list before installing <strong>Docker<\/strong> using the given command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt update;<span class=\"kw2\">sudo<\/span> apt upgrade <span class=\"re5\">-y<\/span><\/div><\/div>\n<p>Subsequently, all the system\u2019s repository packages will be updated:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"347\" class=\"wp-image-24496\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-1.png 735w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-1-300x142.png 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/p>\n<p><strong>Step 2: Install Docker on Linux Mint<\/strong><\/p>\n<p>Now, utilize the provided command to install <strong>Docker <\/strong>from Linux Mint\u2019s APT repository:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> docker.io <span class=\"re5\">-y<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"412\" class=\"wp-image-24504\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-2.png 737w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-2-300x168.png 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/p>\n<p>Moreover, if you want to install <strong>Docker <\/strong>with all the dependencies and packages from the APT repository, execute the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> docker<span class=\"sy0\">*<\/span> <span class=\"re5\">-y<\/span><\/div><\/div>\n<p>By doing so, all the <strong>Docker-related<\/strong> packages will be installed:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"729\" height=\"545\" class=\"wp-image-24511\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-3.png 729w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-3-300x224.png 300w\" sizes=\"auto, (max-width: 729px) 100vw, 729px\" \/><\/p>\n<p><strong>Step 3: Verification <\/strong><\/p>\n<p>Finally, check the <strong>Docker\u2019s <\/strong>version to verify that the <strong>Docker <\/strong>has been installed on the system:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">docker <span class=\"re5\">--version<\/span><\/div><\/div>\n<p>The below output indicates that the older version of <strong>Docker <\/strong>has been successfully installed:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"718\" height=\"127\" class=\"wp-image-24518\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-4.png 718w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-4-300x53.png 300w\" sizes=\"auto, (max-width: 718px) 100vw, 718px\" \/><\/p>\n<h3><a id=\"post-24471-k7a9fkxxtwi6\"><\/a>Method 2: Official Docker Repository<\/h3>\n<p>If you want to install the latest version of <strong>Docker<\/strong>, add the official <strong>Docker <\/strong>repository to your Linux Mint system. This method will not only install <strong>Docker<\/strong>\u2019s latest version but also update it automatically using the package manager on your system whenever the new version is released (available).<\/p>\n<p>Here are the steps:<\/p>\n<p><strong>Step 1: Update and Upgrade System Repository<\/strong><\/p>\n<p>First, update and upgrade the system\u2019s packages:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt update;<span class=\"kw2\">sudo<\/span> apt upgrade<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"321\" class=\"wp-image-24529\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-5.png 735w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-5-300x131.png 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/p>\n<p><strong>Step 2: Install Necessary Dependencies<\/strong><\/p>\n<p>Next, install the desired dependencies for <strong>Docker\u2019s<\/strong> installation on Linux Mint:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> gnupg ca-certificates apt-transport-https curl<\/div><\/div>\n<p>Here:<\/p>\n<ul>\n<li>\u201c<strong>curl<\/strong>\u201d is utilized to make\/create HTTP requests on the internet.<\/li>\n<li>\u201c<strong>gnupg2<\/strong>\u201d is a tool for encryption and secure communication.<\/li>\n<li>\u201c<strong>apt-transport-https<\/strong>\u201d allows APT repositories to use HTTPS protocol for secure package downloads.<\/li>\n<li>\u201c<strong>ca-certificates<\/strong>\u201d is utilized for a secure connection.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"788\" height=\"387\" class=\"wp-image-24545\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-6.png 788w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-6-300x147.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-6-768x377.png 768w\" sizes=\"auto, (max-width: 788px) 100vw, 788px\" \/><\/p>\n<p><strong>Step 3: Import GPG Key for Docker<\/strong><\/p>\n<p>Now, import the GPG key using the given command to ensure the integrity of<strong> Docker <\/strong>packages on Linux Mint:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">curl <span class=\"re5\">-fsSL<\/span> https:<span class=\"sy0\">\/\/<\/span>download.docker.com<span class=\"sy0\">\/<\/span>linux<span class=\"sy0\">\/<\/span>ubuntu<span class=\"sy0\">\/<\/span>gpg <span class=\"sy0\">|<\/span> <span class=\"kw2\">sudo<\/span> gpg <span class=\"re5\">--dearmor<\/span> <span class=\"re5\">-o<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>apt<span class=\"sy0\">\/<\/span>keyrings<span class=\"sy0\">\/<\/span>docker.gpg<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"717\" height=\"128\" class=\"wp-image-24559\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-7.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-7.png 717w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-7-300x54.png 300w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/><\/p>\n<p><strong>Step 4: Add Official Docker Repository in Linux Mint<\/strong><\/p>\n<p>Then, add\/import the <strong>Docker\u2019s <\/strong>official repository to the system:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;deb [arch=<span class=\"es4\">$(dpkg --print-architecture)<\/span> signed-by=\/etc\/apt\/keyrings\/docker.gpg] https:\/\/download.docker.com\/linux\/ubuntu <span class=\"es4\">$(. \/etc\/os-release &amp;&amp; echo &quot;$UBUNTU_CODENAME&quot;)<\/span> stable&quot;<\/span> <span class=\"sy0\">|<\/span> <span class=\"kw2\">sudo<\/span> <span class=\"kw2\">tee<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>apt<span class=\"sy0\">\/<\/span>sources.list.d<span class=\"sy0\">\/<\/span>docker.list <span class=\"sy0\">&gt;<\/span> <span class=\"sy0\">\/<\/span>dev<span class=\"sy0\">\/<\/span>null<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"717\" height=\"191\" class=\"wp-image-24566\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-8.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-8.png 717w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-8-300x80.png 300w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/><\/p>\n<p><strong>Step 5: Update System\u2019s Package List<\/strong><\/p>\n<p>After that, update the system\u2019s repository to successfully add the <strong>Docker <\/strong>repository to the system:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt update<\/div><\/div>\n<p>Upon doing so, the repository\u2019s package list has been updated:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"412\" class=\"wp-image-24576\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-9.png 716w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-9-300x173.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/p>\n<p><strong>Step 6: Install Required Packages of Docker<\/strong><\/p>\n<p>Now, install the latest version of the desired <strong>Docker <\/strong>packages using the \u201c<strong>sudo apt install<\/strong>\u201d command and specify the required package names that you want to install. For instance, we are installing the following <strong>Docker <\/strong>packages on Linux Mint:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> containerd.io docker-ce docker-ce-cli <span class=\"re5\">-y<\/span><\/div><\/div>\n<p>Here:<\/p>\n<ul>\n<li>\u201c<strong>containerd.io<\/strong>\u201d is the container runtime that handles the container\u2019s lifecycle.<\/li>\n<li>\u201c<strong>docker-ce<\/strong>\u201d is the Docker engine, i.e., <strong>ce=community edition<\/strong>.<\/li>\n<li>\u201c<strong>docker-ce-cli<\/strong>\u201d is the Docker command-line interface to interact\/communicate with Docker Daemon.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"754\" height=\"410\" class=\"wp-image-24588\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-10.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-10.png 754w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-10-300x163.png 300w\" sizes=\"auto, (max-width: 754px) 100vw, 754px\" \/><\/p>\n<p><strong>Step 7: Verification<\/strong><\/p>\n<p>To verify whether <strong>Docker\u2019s <\/strong>latest version has been installed or not, write out the given command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">docker <span class=\"re5\">--version<\/span><\/div><\/div>\n<p>As you can see, the latest version of <strong>Docker <\/strong>has been successfully installed on Linux Mint:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"717\" height=\"123\" class=\"wp-image-24596\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-11.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-11.png 717w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-11-300x51.png 300w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/><\/p>\n<h3><a id=\"post-24471-4qial7bk8ha\"><\/a>Method 3: Deb File<\/h3>\n<p>Another way to install <strong>Docker <\/strong>on Linux Mint is by downloading its deb package files from its official website. This method installs <strong>Docker\u2019s <\/strong>latest version, but you will not get upgraded automatically when the new release is introduced. To get the new <strong>Docker <\/strong>version, download the new deb package files and install them on your system via deb files:<\/p>\n<p><strong>Step 1: Download Docker Deb Files on Linux Mint<\/strong><\/p>\n<p>First, download the required latest deb files from the <a href=\"https:\/\/download.docker.com\/linux\/ubuntu\/dists\/jammy\/pool\/stable\/amd64\/\"><strong>official Docker website<\/strong><\/a> by clicking on them. Here, we are downloading the latest version of the \u201c<strong>containerd.io<\/strong>\u201d, \u201c<strong>docker-ce<\/strong>\u201d, and \u201c<strong>docker-ce-cli<\/strong>\u201d deb files:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"789\" height=\"559\" class=\"wp-image-24608\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-12.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-12.png 789w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-12-300x213.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-12-768x544.png 768w\" sizes=\"auto, (max-width: 789px) 100vw, 789px\" \/><\/p>\n<p><strong>Step 2: Install Docker on Linux Mint<\/strong><\/p>\n<p>Then, launch the terminal and redirect to the \u201c<strong>Downloads<\/strong>\u201d folder where the deb package files are downloaded:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">cd<\/span> Downloads<br \/>\n<br \/>\n<span class=\"kw2\">ls<\/span><\/div><\/div>\n<p>It can be observed that the \u201c<strong>Downloads<\/strong>\u201d directory contains the <strong>Docker<\/strong>\u2019s deb files:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"717\" height=\"212\" class=\"wp-image-24617\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-13.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-13.png 717w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-13-300x89.png 300w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/><\/p>\n<p>Now, use the \u201c<strong>sudo apt install<\/strong>\u201d command with the deb package file names to install <strong>Docker <\/strong>on your system:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> .<span class=\"sy0\">\/<\/span>containerd.io_1.6.26-<span class=\"nu0\">1<\/span>_amd64.deb .<span class=\"sy0\">\/<\/span>docker-ce_24.0.7-<span class=\"nu0\">1<\/span>~ubuntu.22.04~jammy_amd64.deb .<span class=\"sy0\">\/<\/span>docker-ce-cli_24.0.7-<span class=\"nu0\">1<\/span>~ubuntu.22.04~jammy_amd64.deb <span class=\"re5\">-y<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"731\" height=\"457\" class=\"wp-image-24631\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-14.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-14.png 731w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-14-300x188.png 300w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/p>\n<p><strong>Step 3: Verification<\/strong><\/p>\n<p>Finally, check the <strong>Docker\u2019s <\/strong>version to ensure that it has been installed on your Linux Mint system:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">docker <span class=\"re5\">--version<\/span><\/div><\/div>\n<p>The below output indicates that the latest version of <strong>Docker <\/strong>has been installed successfully:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"718\" height=\"125\" class=\"wp-image-24639\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-15.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-15.png 718w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-15-300x52.png 300w\" sizes=\"auto, (max-width: 718px) 100vw, 718px\" \/><\/p>\n<h3><a id=\"post-24471-5oc7parreyk9\"><\/a>Method 4: Shell Script<\/h3>\n<p><strong>Docker <\/strong>also offers a <a href=\"https:\/\/get.docker.com\/\"><strong>shell script<\/strong><\/a> that can be used to install <strong>Docker<\/strong> on Linux Mint. It is the easiest and quickest approach for installing <strong>Docker\u2019s <\/strong>latest version on your systems. You can try out the given steps to install <strong>Docker <\/strong>via convenience script on the Linux Mint system:<\/p>\n<p><strong>Step 1: Download the Convenience Script on the System<\/strong><\/p>\n<p>First, use the \u201c<strong>curl<\/strong>\u201d command to download the <strong>Docker\u2019s <\/strong>convenience script on your system with the name \u201c<strong>install-docker.sh<\/strong>\u201d:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">curl <span class=\"re5\">-fsSL<\/span> https:<span class=\"sy0\">\/\/<\/span>get.docker.com <span class=\"re5\">-o<\/span> install-docker.sh<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"725\" height=\"102\" class=\"wp-image-24645\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-16.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-16.png 725w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-16-300x42.png 300w\" sizes=\"auto, (max-width: 725px) 100vw, 725px\" \/><\/p>\n<p><strong>Step 2: Install Docker on Linux Mint<\/strong><\/p>\n<p>Then, run the \u201c<strong>install-docker.sh<\/strong>\u201d script file using the provided command to install and set up <strong>Docker <\/strong>on Linux Mint:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">sh<\/span> install-docker.sh<\/div><\/div>\n<p>According to the below output, the convenience script has successfully installed the latest version of <strong>Docker<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"724\" height=\"566\" class=\"wp-image-24652\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-17.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-17.png 724w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-17-300x235.png 300w\" sizes=\"auto, (max-width: 724px) 100vw, 724px\" \/><\/p>\n<h3><a id=\"post-24471-j4tpib48z1m9\"><\/a>Method 5: Snap Store<\/h3>\n<p>The Snap store contains the <strong>Docker <\/strong>package that can be installed easily using the Snap package manager. However, this method does not install the latest (updated) version of <strong>Docker<\/strong>.<\/p>\n<p>To install <strong>Docker <\/strong>from the Snap Store, try out the below-mentioned steps:<\/p>\n<p><strong>Step 1: Enable Snap on Linux Mint<\/strong><\/p>\n<p>In the Linux Mint systems, Snap support is not enabled by default and because of that, users cannot download the package or app from the Snap Store. So, if you want to install an application from the Snap Store, enable the Snap support first by removing the \u201c<strong>nosnap.pref<\/strong>\u201d file from the APT directory using the given command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">rm<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>apt<span class=\"sy0\">\/<\/span>preferences.d<span class=\"sy0\">\/<\/span>nosnap.pref<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"105\" class=\"wp-image-24659\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-18.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-18.png 716w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-18-300x44.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/p>\n<p>Then, write out the below-listed command to update the APT cache:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt update<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"717\" height=\"344\" class=\"wp-image-24665\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-19.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-19.png 717w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-19-300x144.png 300w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/><\/p>\n<p>Next, install the \u201c<strong>snapd<\/strong>\u201d package on your Linux Mint system using the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> snapd<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"718\" height=\"430\" class=\"wp-image-24674\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-20.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-20.png 718w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-20-300x180.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-20-501x300.png 501w\" sizes=\"auto, (max-width: 718px) 100vw, 718px\" \/><\/p>\n<p>After that, utilize the provided command to enable the Snap Demon on Linux Mint to install the Snap applications:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> systemctl <span class=\"kw3\">enable<\/span> snapd<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"105\" class=\"wp-image-24679\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-21.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-21.png 716w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-21-300x44.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/p>\n<p>By doing so, Snap support has been enabled, allowing you to install the desired applications or packages from the Snap Store.<\/p>\n<p><strong>Step 2: Install Docker<\/strong><\/p>\n<p>Now, install <strong>Docker <\/strong>from the Snap Store on your Linux Mint system via the below-listed command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> snap <span class=\"kw2\">install<\/span> docker<\/div><\/div>\n<p>As you can see, the older version of <strong>Docker <\/strong>has been installed from the Snap Store:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"726\" height=\"127\" class=\"wp-image-24683\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-22.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-22.png 726w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-22-300x52.png 300w\" sizes=\"auto, (max-width: 726px) 100vw, 726px\" \/><\/p>\n<h2><a id=\"post-24471-7yl9wgrm1z5e\"><\/a>How to Use Docker as a Regular User on Linux Mint 21<\/h2>\n<p>When<strong> Docker <\/strong>is installed on Linux systems, the <strong>Docker <\/strong>Daemon runs with the root (sudo) privileges. It indicates that you have to run the <strong>Docker <\/strong>commands with the root rights. When you try to run <strong>Docker <\/strong>commands without \u201csudo\u201d, it gives an error as seen below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"726\" height=\"192\" class=\"wp-image-24686\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-23.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-23.png 726w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-23-300x79.png 300w\" sizes=\"auto, (max-width: 726px) 100vw, 726px\" \/><\/p>\n<p>To resolve this issue and run <strong>Docker <\/strong>commands without sudo rights, follow the provided steps:<\/p>\n<p><strong>Step 1: Make Docker Group<\/strong><\/p>\n<p>First, utilize the \u201c<strong>sudo groupadd<\/strong>\u201d command and specify the group name for <strong>Docker <\/strong>to make its group. Here, we have specified \u201c<strong>docker<\/strong>\u201d as the group name:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> groupadd docker<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"736\" height=\"100\" class=\"wp-image-24690\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-24.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-24.png 736w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-24-300x41.png 300w\" sizes=\"auto, (max-width: 736px) 100vw, 736px\" \/><\/p>\n<p><strong>Step 2: Add Current User to Docker Group<\/strong><\/p>\n<p>Next, add the current user (or any other user) to the <strong>docker <\/strong>group through the following command. Here, we are using the \u201c<strong>usermod<\/strong>\u201d command to modify the existing user and appending it to the \u201c<strong>docker<\/strong>\u201d group via the \u201c-aG\u201d flags:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> usermod <span class=\"re5\">-aG<\/span> docker <span class=\"re1\">$USER<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"725\" height=\"104\" class=\"wp-image-24695\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-25.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-25.png 725w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-25-300x43.png 300w\" sizes=\"auto, (max-width: 725px) 100vw, 725px\" \/><\/p>\n<p><strong>Step 3: Apply Changes<\/strong><\/p>\n<p>Then, run the below-listed command to refresh the current terminal sessions and apply the changes:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">newgrp docker<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"724\" height=\"102\" class=\"wp-image-24697\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-26.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-26.png 724w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-26-300x42.png 300w\" sizes=\"auto, (max-width: 724px) 100vw, 724px\" \/><\/p>\n<p><strong>Step 4: Verification<\/strong><\/p>\n<p>To verify whether we can use <strong>Docker <\/strong>as regular users or not, execute the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">docker run hello-world<\/div><\/div>\n<p>As you can see, the <strong>Docker <\/strong>commands are now successfully running without \u201csudo\u201d. This indicates that now <strong>Docker <\/strong>can be used as a regular user on this system:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"725\" height=\"467\" class=\"wp-image-24703\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-27.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-27.png 725w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-27-300x193.png 300w\" sizes=\"auto, (max-width: 725px) 100vw, 725px\" \/><\/p>\n<h2><a id=\"post-24471-ve2uwmmlred8\"><\/a>How to Uninstall\/Remove Docker From Linux Mint 21<\/h2>\n<p>There are different possible ways to uninstall or remove <strong>Docker <\/strong>from your Linux Mint system. You can choose the specific removal method and remove <strong>Docker <\/strong>according to the installation method that you have used to install <strong>Docker<\/strong>.<\/p>\n<h3>If Installed Via Linux Mint\/Docker Repository or Shell Script<\/h3>\n<p>If you have installed <strong>Docker <\/strong>from the default Linux Mint repository, the official <strong>Docker <\/strong>repository, or via the convenience script, use the following command to remove it from your system:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt autoremove docker<span class=\"sy0\">*<\/span> <span class=\"re5\">--purge<\/span> <span class=\"re5\">-y<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"717\" height=\"565\" class=\"wp-image-24709\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-28.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-28.png 717w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-28-300x236.png 300w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/><\/p>\n<p>You should also remove the <strong>Docker <\/strong>repository from your system that you have added at the time of installation using the below-given command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">rm<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>apt<span class=\"sy0\">\/<\/span>sources.list.d<span class=\"sy0\">\/<\/span>docker.list<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"717\" height=\"105\" class=\"wp-image-24714\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-29.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-29.png 717w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-29-300x44.png 300w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/><\/p>\n<p>Similarly, remove the GPG key that was imported into your system through the below-given command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">rm<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>apt<span class=\"sy0\">\/<\/span>keyrings<span class=\"sy0\">\/<\/span>docker.gpg<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"717\" height=\"102\" class=\"wp-image-24717\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-30.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-30.png 717w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-30-300x43.png 300w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/><\/p>\n<h3>If Installed Via Deb Files<\/h3>\n<p>If you have installed <strong>Docker <\/strong>via the deb packages files, utilize the provided command to remove it from your system:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt remove containerd.io docker-ce docker-ce-cli <span class=\"re5\">-y<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"725\" height=\"369\" class=\"wp-image-24722\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-31.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-31.png 725w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-31-300x153.png 300w\" sizes=\"auto, (max-width: 725px) 100vw, 725px\" \/><\/p>\n<h3>If Installed Via Snap Method<\/h3>\n<p>If the <strong>Docker <\/strong>is installed from the Snap Store, remove\/uninstall it as:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> snap remove docker<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"727\" height=\"126\" class=\"wp-image-24727\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-32.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-32.png 727w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24471-32-300x52.png 300w\" sizes=\"auto, (max-width: 727px) 100vw, 727px\" \/><\/p>\n<p>That was all about installing and uninstalling <strong>Docker <\/strong>on Linux Mint.<\/p>\n<p><strong>Note:<\/strong> Check out the <a href=\"https:\/\/docs.docker.com\/engine\/install\/ubuntu\/\">official documentation<\/a> of Docker for more information.<\/p>\n<h2><a id=\"post-24471-gdks2c1jpry\"><\/a>Conclusion<\/h2>\n<p><strong>Docker<\/strong> is a containerized tool that is used to isolate applications that can be run in different environments. You can install <strong>Docker <\/strong>on Linux Mint through the default APT repository, official <strong>Docker <\/strong>repository, deb files, convenience script, or from Snap Store.<\/p>\n<p>Among these methods, the default APT Linux repository method and convenience script method are the easiest way to install <strong>Docker<\/strong>. However, if you want to get <strong>Docker\u2019s <\/strong>latest version on your system, you can use the official <strong>Docker <\/strong>repository or Deb file methods. This guide has explained all these potential ways to install as well as remove\/uninstall <strong>Docker <\/strong>on Linux Mint. You can follow any of these methods to install and use <strong>Docker <\/strong>on the Linux Mint system.<\/p>","protected":false},"excerpt":{"rendered":"<p>You can install Docker on Linux Mint from the default APT repository, official Docker repository, deb files, convenience script, or from Snap Store.<\/p>","protected":false},"author":112,"featured_media":24790,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-24471","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mint"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/24471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/112"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=24471"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/24471\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/24790"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=24471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=24471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=24471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}