Docker/Docker Compose
How to setup Docker/Docker Compose and apps related to managing it.
- Setup Docker/Docker Compose
- Portainer (Optional; Beginner)
- Dockge (Optional; Intermediate)
- Komodo (Optional; Advanced)
Setup Docker/Docker Compose
Docker Prep/Prerequisites (Debian)
This guide assumes you are running a Debian based OS. So, it will work regardless of whether you are using Proxmox, OMV, Ubuntu Server, Linux Mint or anything else that uses APT. If you are using some flavor of Arch, Fedora, FreeBSD or any of their derivatives, you'll have to use their version of these commands. For example, Arch uses AUR. I don't know what the others use. I might change the guide to support other OSs, if I feel energetic enough.
Do note that you may want/need to alter the process quite a bit for stuff like Proxmox and OMV, since they use a GUI that is very different from a normal desktop/server distro like Mint or Ubuntu Server. For example, you'll probably want to use a Docker LXC under Proxmox, rather than running Docker directly on the host OS. For OMV, you'll have to decide whether to install everything directly from the command line (as this guide covers) or to install it from OMV-extras. I do cover how to install OMV-extras in the OMV Setup guide. If you need to access the command line in OMV, there are two ways. One way is to remote connect with SSH and the other is to install a plugin called WeTTY, which is also requires OMV-extras but the OMV Setup guide covers this too.
Install prerequisites:
sudo apt updatesudo apt install apt-transport-https ca-certificates curl gnupg
Add Docker's Official GPG Key: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg
Add Docker Repo: echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Refresh package list again: sudo apt update
Docker/Docker Compose Setup
The actual setup is fairly easy. However, you have to do some prep work first.
Install docker: sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Verify: sudo systemctl is-active docker
Add your user to Docker group: sudo usermod -aG docker ${USER}
Reboot server for permissions to take effect or run this command: newgrp docker
Verify docker access with: docker ps
References:
https://www.reddit.com/r/portainer/comments/lykvxb/export_your_docker_containers_to_a_docker/
https://github.com/Red5d/docker-autocompose
https://linuxiac.com/how-to-install-docker-on-linux-mint-21/
https://docs.docker.com/engine/install/
Portainer (Optional; Beginner)
This is the easiest tool to setup for managing Docker containers.
Install Portainer
Create Docker Volume: docker volume create portainer_data
Deploy Portainer:
docker run -d \
-p 8000:8000 \
-p 9443:9443 \
--name portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest
Connect to portainer "https://localhost:9443" and setup admin account.
Click Home -> Environments and add the host IP (10.20.10.75, for me) into the Public IP field.
Optionally, change Settings -> Settings -> Application Settings -> URL to https://raw.githubusercontent.com/technorabilia/portainer-templates/main/lsio/templates/templates-2.0.json
References:
https://linuxiac.com/docker-portainer-install/
Start at about 5 minutes - https://www.youtube.com/watch?v=2UrZzXCqcLc
11/15/2025 - Fix
So, the current version of Docker depreciates the version of the API used by Portainer. This can be fixed a couple of ways. One is to downgrade the version of Portainer to 2.20.2 but this didn't work too well for me. The other method is to lower the minimum required API to 1.24. It's not ideal either, since it could cause problems later on. The final choice is to wait for Portainer to release an update that fixes it.
Here are the steps for lowering the API minimum to 1.24:
sudo systemctl edit docker.service- Add this part above the line ### Lines below this comment will be discarded:
[Service] Environment=DOCKER_MIN_API_VERSION=1.24 - Save the file and exit (Ctrl+O; Ctrl+X in Nano, the default for Linux Mint)
sudo systemctl restart docker
To revert the change, repeat all steps but, instead of adding those two lines, delete them.
Do Not Recommend How to downgrade to 2.20.2 run the following commands:
docker stop portainerdocker rm portainer-
docker run -d \ -p 8000:8000 \ -p 9443:9443 \ --name portainer \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v portainer_data:/data \ portainer/portainer-ce::2.20.2
To update to the current version, replace "2.20.2" at the end with "latest" and run the commands again.
Dockge (Optional; Intermediate)
This is a decent alternative to Portainer. It does less hand holding but has more freedom.
Komodo (Optional; Advanced)
This is another Docker container management app. It's a bit much and has a number of prerequisites. The worst of which is needing your own email server.