Docker install not working on Ubuntu 22.04 with virtualmin/webmin

I spent the last 24 hours pretty much trying to get Docker installed and running. I tried installing from the terminal using the Docker documentation, and tried installing from within webmin and spent hours on Docker discord with their support. Nothing seems to work.

I am assuming plenty of people must have Docker working with Ubuntu 22.04 and virtualmin/webmin. The Docker support pretty much told me to just uninstall and not use webmin which was not much help.

sudo systemctl status docker.service
[sudo] password for jay:
× docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2023-03-17 03:17:58 UTC; 1h 2min ago
TriggeredBy: × docker.socket
Docs: https://docs.docker.com/
Process: 26427 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 26427 (code=exited, status=1/FAILURE)

Mar 17 03:17:55 webserver.t.net systemd[1]: Failed to start Docker Application Container Engine.
Mar 17 03:17:58 webserver.t.net systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Mar 17 03:17:58 webserver.t.net systemd[1]: Stopped Docker Application Container Engine.
Mar 17 03:17:58 webserver.t.net systemd[1]: docker.service: Start request repeated too quickly.
Mar 17 03:17:58 webserver.t.net systemd[1]: docker.service: Failed with result ‘exit-code’.
Mar 17 03:17:58 webserver.t.net systemd[1]: Failed to start Docker Application Container Engine.

SYSTEM INFORMATION
OS type and version Ubuntu 22.04
Virtualmin version 7.5

Webmin has nothing to do with Docker. I mean, there is absolutely nothing Webmin does that would interact with Docker.

I have to assume that if you followed the exact same process without Webmin installed, you’d get the exact same result.

That said, I’ve never had problems with Docker on Ubuntu 20.04 (my other job is currently locked on 20.04 across our infrastructure, so I haven’t used it on 22.04). (And, Webmin being installed or not makes no difference.)

Yea, I agree with you. I tried to tell Docker support that but they were super focused on the fact i had Webmin installed.

I just really need to get Docker installed and working or I am screwed. This is a fresh install of Ubuntu 22.04 with only webmin/virtualmin on it and now Docker.

If you can help me at all try to troubleshoot this it would be a blessing. The Journalctl does not say much to me.

  1. sudo journalctl -xeu docker.service ░░ Subject: A start job for unit docker.service has failed ░░ Defined-By: systemd ░░ Support: Enterprise open source support | Ubuntu ░░ ░░ A start job for unit docker.service has finished with a failure. ░░ ░░ The job identifier is 743 and the job result is failed. Mar 17 04:42:19 webserver.t.net systemd[1]: docker.service: Scheduled restart job, restart counter is at 3. ░░ Subject: Automatic restarting of a unit has been scheduled ░░ Defined-By: systemd ░░ Support: Enterprise open source support | Ubuntu ░░ ░░ Automatic restarting of the unit docker.service has been scheduled, as the result for ░░ the configured Restart= setting for the unit. Mar 17 04:42:19 webserver.t.net systemd[1]: Stopped Docker Application Container Engine. ░░ Subject: A stop job for unit docker.service has finished ░░ Defined-By: systemd ░░ Support: Enterprise open source support | Ubuntu ░░ ░░ A stop job for unit docker.service has finished. ░░ ░░ The job identifier is 811 and the job result is done. Mar 17 04:42:19 webserver.t.net systemd[1]: docker.service: Start request repeated too quickly. Mar 17 04:42:19 webserver.t.net systemd[1]: docker.service: Failed with result ‘exit-code’. ░░ Subject: Unit failed ░░ Defined-By: systemd ░░ Support: Enterprise open source support | Ubuntu ░░ ░░ The unit docker.service has entered the ‘failed’ state with result ‘exit-code’. Mar 17 04:42:19 webserver.t.net systemd[1]: Failed to start Docker Application Container Engine. ░░ Subject: A start job for unit docker.service has failed ░░ Defined-By: systemd ░░ Support: Enterprise open source support | Ubuntu ░░ ░░ A start job for unit docker.service has finished with a failure. ░░ ░░ The job identifier is 811 and the job result is failed.

I can’t do anything with that. There is no useful error there. I’m no Docker expert, but if you post the actual errors from the journal, I might have suggestions.

Er, I guess that is the journal, but I still don’t see any useful errors. I’d try starting the docker daemon manually using whatever command the systemd unit is running to see what the actual errors are.

I don’t know much about docker install on Ubuntu but if I was you I would do a fresh install and try a docker install by itself so to get use to installing docker.
I’m not sure what resources you have. But if that works ok then install VM. Still all good. Backup you VM and restore to new machine.

Then you messed something up along the way. I’ve done it and it runs perfectly.

As Joe mentioned, it has absolutely nothing to do with Webmin/Virtualmin. You need to work in Ubuntu terminal only. DO NOT use the terminal via Webmin/Virtualmin. Use the terminal directly in Ubuntu.

I installed Docker (and uninstalled it) around 10 different times from the terminal before trying it in Webmin because I was so frustrated that I can not get it to work.

I tried 2 methods and neither one worked. Install Docker Engine on Ubuntu and How To Install and Use Docker on Ubuntu 22.04 | DigitalOcean

No one including myself seems to be able to get any useful information from any of the error messages coming from systemctl or journalctl

If you have installed it on ubuntu 22.04 and it works perfectly maybe you can help me? Which install method did you use? Obviously, something is messed up but when nearly an 8-hour day was wasted installing and uninstalling and Docker support discord and here can not get any info from the errors it is hard to figure out what to do next.

Does this screenshot from webmin help at all? Says it is down which i guess is obvious.

You do realize that lists 4 different ways to install it, right?

I installed it using the “Install Using the Apt Repository” method. I certainly hope you didn’t run every command listed in that article. If you did, you’ve got a complete mess going.

I have been using linux for a while, not that stupid. After every install that does not work I fully remove it before trying anything again.

I also used the same install method over 10 times. Every single time it installs fine up until the point you see on the screenshot and then the errors begin.

Every install is easy when it works perfectly, the issue is when it does not and how to figure out why. From the Docker discord support to this forum, no one can figure out what is causing this so far.

Well I got Docker finally installed. The issue was the firewall.

Once I used “sudo systemctl stop firewalld” and ran the install it worked fine.

Strange no one else ran into this same issue? Not sure what to do about the firewall now but at least I got docker running.

Webmin does not install a firewall. Virtualmin does.

I’m not sure, though, why Docker would have a problem interacting with local services, regardless of the firewall. The firewall only effects incoming network activity, nothing with local services. I can’t think of any legitimate reason Docker would conflict with a firewall that does not do anything to local communications (i.e. 127.0.0.1 is not touched by the firewall).

I would love to understand more myself. All I know is as soon as I stopped firewalld everything went smoothly with the installation of docker. Someone in the Docker discord suggested i try it.

Keep this in your notes for the next time you need to install docker on Ubuntu 22 server.
I have over 12 VPS with Docker and Firewalld with Webmin for management.
The only ports you need to open in the firewall are ports the docker app needs to talk to the outside world.

Install docker with the following commands.

sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release -y

As root for the signed keyrings.

su - root
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
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

You can exit back to sudo user for the installation or continue as root.

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y

If you are doing the install as a sudo user than give yourself permissions to use docker commands.

sudo usermod -aG docker $USER
sudo systemctl start docker.service
sudo systemctl enable docker.service

Always good to reboot the system and make sure all is running on startup.

sudo reboot

Commands to see if docker is running.

docker version
docker pull hello-world
docker run hello-world
docker container ls
docker images
docker stats
docker network ls
docker compose version

I have done this both in SSH through putty and Webmin Terminal with no issues.

Regards,

2 Likes

I wonder why is that?

search me … it works real well