0 out of 1 tasks 1/1: mkdir /var/lib/docker: read-only
You probably installed Docker with flatpak installation or via software center
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:
To install Docker on Ubuntu 24.04 Server, follow these recommended and up-to-date steps:
- Update your system and install essential dependencies:
sudo apt update
sudo apt install curl apt-transport-https ca-certificates software-properties-common -y- 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- 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- Update the package list to include Docker packages:
sudo apt update- Install Docker Community Edition:
sudo apt install docker-ce -y- Check if Docker is running:
sudo systemctl status dockerDocker service should start automatically after installation.
- 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.