Skip to main content
  1. Posts/

How to Install Docker on Linux Mint in One Command

·299 words·2 mins· loading · loading · ·
categories: Tutorial
tags: Tutorial Docker Ubuntu Linux Mint Install

Why on Linux Mint? Well, because I have a Linux Mint computer. I’ve successfully installed Docker on my computer and here’s the one-line command on how to do it without the mumbo jumbo of the official Docker docs. if this post gets traction, I might write another Docker Installation tutorial for other distros.

Here’s the command for a one-line Docker install on Linux Mint

curl -L s.revonzev.com/install-docker-linux-mint-curl | bash

Or the full command:

sudo apt-get update && \
    sudo apt-get -y install ca-certificates curl && \
    sudo install -m 0755 -d /etc/apt/keyrings && \
    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc && \
    sudo chmod a+r /etc/apt/keyrings/docker.asc && \
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$UBUNTU_CODENAME") stable" | \
    sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && \
    sudo apt-get update && \
    sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin && \
    sudo docker run hello-world && \
    sudo groupadd docker ;
    sudo usermod -aG docker $USER && \
    sudo mkdir /home/"$USER"/.docker
    sudo chown "$USER":"$USER" /home/"$USER"/.docker -R && \
    sudo chmod g+rwx "$HOME/.docker" && \
    docker run hello-world

Do restart afterward if you see the following error: docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Head "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied.

Then try to run docker run hello-world to see if you can run docker without sudo permission.

Some docker images need you to log in, you can do so by running docker login command.

You can find the official Ubuntu Docker installation steps here.

Or other official Docker installation steps for other distro (CentOS, Debian, Fedora, Pi, RHEL SLES, Ubuntu) here.

I made this post because I just want to copy and paste and be done with it every time I start a fresh Linux Mint install.

Revon Zev
Author
Revon Zev
A game streamer on Twitch, and a game VTuber on YouTube with a hobby of creating art and programming.

Related

How to Install Caddy with Docker
·428 words·3 mins· loading · loading
categories: Tutorial
tags: Tutorial Docker Ubuntu Linux Mint Install
How to Self-Host Outline Alongside Caddy
·744 words·4 mins· loading · loading
categories: Tutorial
tags: Tutorial Docker Ubuntu Linux Mint Caddy Install
Fist Post
·480 words·3 mins· loading · loading
categories: Uncategorized
tags: Other