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.
Tested on
Here’s the command for a one-line Docker install on Linux Mint:
curl -L s.revonzev.com/install-docker-linux-mint-curl | bash
BashOr 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
BashDo 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.
PlaintextThen 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: s.revonzev.com/official-docker-ubuntu-tutorial
Or other official Docker installation steps for other distro (CentOS, Debian, Fedora, Pi, RHEL SLES, Ubuntu) here: s.revonzev.com/official-docker-tutorial
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.