Install Docker on Linux / Raspberry Pi OS
This guide explains how to install Docker on Linux, including Raspberry Pi OS, to run the remote Wake-on-LAN service for Turn Off PC.
The installation process and commands are the same for Linux and Raspberry Pi OS.
Supported systems
This guide applies to:
- Ubuntu
- Debian
- Linux Mint
- Raspberry Pi OS
- Other Debian-based Linux distributions
Applies to:
- Servers
- Desktop PCs
- Mini PCs
- Raspberry Pi (recommended for always-on usage)
What this setup does
After completing this guide:
- Docker Engine will be installed
- Docker will run as a system service
- The system will be ready to run containers
- The remote Wake-on-LAN service can be deployed
Prerequisites
Before continuing, make sure that:
- You are running a supported Linux distribution
- You have administrator (root) privileges
- The system has internet access
- The system is connected to the local network
Step 1: Install Docker
Docker provides an official installation script.
Run the following command:
curl -fsSL https://get.docker.com | sh
This command:
- Detects your Linux distribution
- Installs Docker Engine
- Installs required dependencies
- Configures the Docker service
This works on both Linux and Raspberry Pi OS.
Step 2: Enable and start Docker
Ensure Docker starts automatically at boot:
sudo systemctl enable docker
sudo systemctl start docker
Verify Docker is running:
sudo systemctl status docker
The service should be active (running).
Step 3: Allow Docker without sudo (recommended)
By default, Docker requires sudo.
To allow your user to run Docker commands without sudo:
sudo usermod -aG docker $USER
Then log out and log back in for the change to take effect.
Step 4: Verify Docker installation
Run the following command:
docker version
You should see both:
- Client version
- Server version
Test Docker with a simple container:
docker run hello-world
If the container runs successfully, Docker is installed correctly.
Common problems
Docker command not found
- Log out and log back in
- Ensure Docker is installed correctly
Permission denied when running Docker
- Ensure your user is in the
dockergroup - Reboot or re-login after running
usermod
Docker service not running
- Start the service manually:
sudo systemctl start docker
- Check logs if needed:
journalctl -u docker