Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vinicioslc/a45805b61994cd3a0ffd9717521eb825 to your computer and use it in GitHub Desktop.
Save vinicioslc/a45805b61994cd3a0ffd9717521eb825 to your computer and use it in GitHub Desktop.
Fix for dokploy install stuck at: `"dokploy" 0 out of 1 tasks 1/1: mkdir var/lib/docker: read-only`

Error

0 out of 1 tasks 1/1: mkdir /var/lib/docker: read-only

Cause

You probably installed Docker with flatpak installation or via software center

Fix

First uninstall docker with flatpak remove and proceed with docker installation bellow

Here is the English translation of your Docker installation guide for Ubuntu 24.04 Server:


How to Install Docker on Ubuntu 24.04 Server

To install Docker on Ubuntu 24.04 Server, follow these recommended and up-to-date steps:

Steps to Install Docker on Ubuntu 24.04 Server

  1. Update your system and install essential dependencies:
sudo apt update
sudo apt install curl apt-transport-https ca-certificates software-properties-common -y
  1. Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  1. Add Docker’s official repository for Ubuntu 24.04:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  1. Update the package list to include Docker packages:
sudo apt update
  1. Install Docker Community Edition:
sudo apt install docker-ce -y
  1. Check if Docker is running:
sudo systemctl status docker

Docker service should start automatically after installation.

Notes

  • This method installs the latest version of Docker available from the official Docker repository for Ubuntu.
  • You can use Docker as the root user or configure your user to run Docker without sudo.
  • Basic container management commands include docker run, docker ps, docker stop, etc.

These steps provide a complete and updated Docker installation on Ubuntu 24.04 Server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment