• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved How to expose a Docker port to the public?

philippL

New Pleskian
Server operating system version
Ubuntu 20.04 LTS
Plesk version and microupdate number
18.0.57 #5
I've installed the official MariaDB docker image and want to connect to it remotely. I've turned off Automatic Port Mapping and specified an external port. Trying to connect to that port on the LAN IP address of the server does not work. Turning off the firewall does not change that. Trying to connect to it locally (127.0.0.1) works fine.

I've tried adding a Docker Proxy Rule to a domain, but the connection did not work and my guess is that this makes no sense as MariaDB is no HTTP application and nginx does not allow to reverse proxy a non-HTTP protocol, unless it's been built -with-streams and Plesk's version has not been built with that.

On Using Docker it says that by default, "Docker binds to the specified port on all network interfaces of the host system". This does not seem to be true. If you check the server for LISTEN ports, then it specifically says that "docker-proxy" is only listening on 127.0.0.1, *not* all interfaces. top only lists docker-proxy commands running with "-host-ip 127.0.0.1". And /etc/docker/daemon.json only contains {"ip":"127.0.0.1"}.

So how can I change the docker network configuration (preferably for one particular docker image only) to expose the public port mapping to the correct network interface?
 
Back
Top