Various Docker issues and suggestions

SYSTEM INFORMATION
OS type and version Ubuntu 22.04
Webmin version 2103
Cloudmin version 9.7 Pro

Howdy!

I discovered that Cloudmin Pro supports managing docker containers.

Docker images don’t show up in Cloudmin, they seem to download but don’t show when going to Docker > Local Docker Images or at Create Docker Container > Host and networking options > Docker image. However I can go to that last one and search images and it will search and find them but selecting one wants the page to reload which pops up a warning I cancel.

Also I can’t figure out how to properly use the tag I want either. If I try to add one it says it doesn’t exist.

I can’t actually even get it to create the container either. When I enter things in how I think they should work based on the docs and click Create System it fails.

Also the docs mention help on the form but when I click the ? icon at the top it says: Error
Failed to read help page newdocker from module server-manager

Finally, what would be extremely awesome is if you had some premade apps that could run behind Nginx automatically with Let’s Encrypt. For example some apps require multiple containers to be created and only some would be behind nginx or require specific types of configurations. Portainer, Elasticsearch, Mastodon, n8n, etc. are some examples. This could be similar to Install Scripts for Virtualmin I suppose. It could be similar to how Caprover, Coolify, Runtipi or others work with their app directories. It also might be cool to be able to automatically build from git push events or other things like Caprover or render.com to completely replace those sorts of things but that might be more complicated stuff for another time. It sure would add some value to Cloudmin though.

Thank you!

Update: I still haven’t been able to figure out the issue. I do know that the command it tries to run works fine in the terminal.

Also I tried to deregister the host system and register it again but when making the new Docker host system and I enter my Docker Hub account info it says this:

Failed to save Docker host : Host was saved, but Hub login failed : unknown shorthand flag: 'e' in -e See 'docker login --help'.
Error details
Can't locate loadable object for module Params::Validate in @INC (@INC contains: /usr/share/webmin/vendor_perl /usr/share/webmin /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl .. .) at Params/ValidateXS.pm line 0. Compilation failed in require at Params/Validate.pm line 38. : server-manager/save_docker.cgi (line 67)

So not sure if it’s due to my password having a bunch of strange characters or what it’s deal is.

Would be cool to be able to find a solution to Docker not working with Cloudmin though if anyone has any ideas.

Actually, I’m noticing since the last webmin and theme update I’m seeing this error when trying to create it too which it just didn’t even show before. I didn’t see anything in the log either but a question mark which was odd.

Failed to create system :
Error details
Can't locate loadable object for module Params::Validate in @INC (@INC contains: /usr/share/webmin/vendor_perl /usr/share/webmin /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl .. .) at Params/ValidateXS.pm line 0. Compilation failed in require at Params/Validate.pm line 38. : server-manager/docker-type-lib.pl (line 590)

Update: Ok I fixed the Docker Hub login by installing libparams-validate-perl:
apt install libparams-validate-perl

However, I still do get the blank error when trying to create a new docker container where the log just logs /server-manager/create.cgi : ?

So not sure where else to go from here now since I’m not seeing any errors even to try and fix.

1 Like

That is odd. @Jamie should be able to provide more details.

Also, when I try to Create Docker Container I do not see create.cgi form but instead it’s create_form.cgi form, e.g.:

Is this how you’re trying to create Docker container?

Thank you for the response!

Yeah I thought it was odd. Just a question mark for the error. I wonder what would cause that. I wonder if it’s something wrong with my docker install somehow. I know I can run the commands it tries to run and I can see the output and all the images on there. But it’s strange that it doesn’t actually list them or install them. Maybe it’s all related somehow to some simple little thing somewhere.

Yep that’s the page I’m trying to create it at. It submits that form to the create.cgi I guess. But I’m not sure why it just says a question mark.

Yes, I see now that it’s getting posted to create.cgi page.

What exactly do you fill on the form page before submitting it? I’m asking because I see that create.cgi can actually produce meaningful errors, so I wonder what could trigger that?

I’ve tried it with pretty much any combination I can think of. I think since it doesn’t list the docker images on the system anywhere it maybe can’t find them to install it. Not really sure if that’s the case though, just speculating.

Don’t you have previously downloaded Docker images listed in the popup when you click on the file selector in Docker image field?

No there are none listed there or under Docker > Local Docker Images. That’s what I suspect may be the root of the problem. I can see there are images running the docker images command and even see the output in the exact same way of the command that webmin tries to run.

If you go to Edit Docker Host and disable Docker hub account, like this:

… afterwards, as you go to Docker ⇾ Search Docker Images, are you able to search and download containers then?

Yep, I can download them and it works. But when I try to list them it doesn’t work in either of the places.

Can you share the screenshot of this page on your system:

It just says “The selected system has no Docker images”

image

However I can search and select them. But they will never show up in there or under Local Docker Images where it says “No Docker images were found on any host systems.”.

In the terminal I can run docker images or what cloudmin/webmin runs: docker images --format '{{ .Repository }} {{ .Tag }} {{ .ID }} {{ .Size }} {{ .CreatedAt }}' and it will show the ones it has downloaded. For example that last command shows this:

nginx latest bc649bab30d1 187MB 2023-10-11 23:14:44 -0400 EDT

I have just tried deleting everything by running docker system prune -a --volumes and then I downloaded nginx to test and it still doesn’t show anything.

One thing I haven’t tried is completely reinstalling the OS and everything from scratch but that just seems like a lot of work with no guarantee it’ll actually work so I haven’t tried it just yet. I think I’ve tried completely removing Docker once or twice but maybe could try that again.

I’m not sure if Cloudmin has to run any processes after I do that or after I run that prune command but maybe if it does that could be something.

I am on Ubuntu 22.04 and it is using the latest Docker 24.0.6.

Thanks for trying to help!

@rrhode Thank you for your excellent, clear explanations and fantastic eye-candy post formatting!

I have taken a closer look to the problem and realized that you’re using docker.io on Ubuntu 22.04 rather than podman-docker. Sadly, docker.io lists images in tiny bit different format, i.e. it has a space after numerical value for the container size. That broken Cloudmin’s ability to extract the list of pulled images.

We will fixed it in the next Cloudmin release!

Meanwhile, you can manually patch /usr/share/webmin/server-manager/docker-type-lib.pl file, search for ^(\S+)\s+(\S+)\s+(\S+)\s+([0-9\.]+\s+\S+)\s+(.*)$ and replace it with ^(\S+)\s+(\S+)\s+(\S+)\s+([0-9\.]+\s*\S+)\s+(.*)$.

It should fix the issue you’ve been having!

@Jamie, on the side note, I’d like to point out that authentication to docker.io using email is deprecated. We need to use API tokens instead.

1 Like

Thank you! That did work!

I figured out I have to use a simple name for the Internet hostname option. It can’t be test.app.example.com or something, it just has to be test and then it will append the rest of it automatically based on what the Add Docker systems to DNS domain setting is in the host.

Perhaps a more helpful error about that would be a good idea too. Otherwise if you enter a dot in the Internet hostname this happens:

Creating a new container says:
Failed to create system :

And it actually has a little question mark when I hover over it that I didn’t notice before which says:
server-manager/docker-type-lib.pl (line 590)

And in the webmin log it says:
/server-manager/create.cgi : ?

Thanks again for your help!!! Now to figure out how to do complicated stuff with it that it probably can’t do yet :grin:

Yes, right, this is common for Cloudmin.

We always throw such error … Ah, I see, you’re right, it was a bug, although Jamie already fixed it upstream, but this change hasn’t made it to the new release yet. But it will. Thanks for the heads up anyway!

You’re welcome!

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.