Installing WebMO on Docker

Post Reply
nico
Posts: 2
Joined: Fri Oct 13, 2023 8:44 am
Full Name: Nicolás Otero Martínez
Organization: Universidade de Vigo
Subdiscipline: Physical Chemistry

Installing WebMO on Docker

Post by nico »

Dears,

We have a workstation where we would like to expose several services such as WebMO and other software programs. For this reason, we are interested in installing WebMO using Docker. I have created some instructions to create a Debian image and the container using Apache:

https://github.com/nom05/docker-webmo-debian

In addition, I have found an equivalent way by means of Ubuntu:

https://gitlab.oit.duke.edu/webmo/webmo-docker

The container works correctly with the port redirection, for example: http://my_domain.com:8080/webmo

The problem of my image is when we need to add it to a Docker router called Traefik to include our certificates and transform the previously said address to https://my_domain.com/webmo, for example. In addition, a middleware (login portal, IP filter, etc.) is very easy to add to Traefik.

My problem is that the redirection explained in your excellent documentation conflicts with the router configuration and the container does not work with Traefik when you access to https://my_domain.com/webmo. I think it could work if the container was directly exposed as http://my_domain.com:8080 to use the Perl cgi_bin and so on instead of using either http://my_domain.com:8080/webmo or ~webmo/cgi_bin/... .

I know I am not strictly following the instruction to install WebMO but it could be a very good opportunity to expand the flexibility to install WebMO in a standardize platform such as Docker and Kubernetes. It would be a very good idea to have an official Docker image as well to facilitate WebMO's installation in different GNU/Linux distributions.

Thank you in advance

schmidt
Posts: 84
Joined: Sat May 30, 2020 3:00 pm
Full Name: JR Schmidt
Organization: WebMO, LLC

Re: Installing WebMO on Docker

Post by schmidt »

I'm having trouble exactly following the goal. You have WebMO running in a container. WebMO does not care it is running inside a container, as long as it is accessible via HTTP (port 80, by default) or HTTPS (port 443, by default). Those ports would need to be exposed/published by the container so that it can be accessed via the outside world (via the corresponding port on the host, running the container).

I don't know the details about Traefik. However, anything that does port forwarding should forward the full URL, which should be handled appropriate by Apache in the container. I guess I don't understand the problem.

Is the issue SSL specific? If so, it is important to know that SSL / HTTPS use a DIFFERENT port than HTTP. (The latter use 80 or 8080, the former use 443). To get things working with SSL, you would need to ensure that the Docker traffic is getting forwarded to 443.

nico
Posts: 2
Joined: Fri Oct 13, 2023 8:44 am
Full Name: Nicolás Otero Martínez
Organization: Universidade de Vigo
Subdiscipline: Physical Chemistry

Re: Installing WebMO on Docker

Post by nico »

Dear Schmidt,

I am afraid the issue is not related to SSL because Traefik is the software managing it and my port mapping is correct. The scheme followeb by Traefik is the following:

OUTSIDE NETWORK <=====> TRAEFIK (domain names, SSL certificates and routing to containers) <======> DOCKER NETWORK <======> WEBMO & OTHER CONTAINERS

In fact, the default Apache web page works adequately with/without SSL certificates. The problem is the strange translation Traefik needs to do to work with ~user/cgi_bin/... It cannot find the route and I see a 404 error in that case. Usually, the containers I use expose all the web resources directly when you access the container directly, instead of including the ~user/cgi_bin/...

I will write a message to the Traefik forum to find out if I can fix the problem.

Best regards

Post Reply