netatalk icon indicating copy to clipboard operation
netatalk copied to clipboard

ability to have the webmin as a separated docker container

Open pferronato opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. I'd like to deploy the webmin as a docker container, so I don't have to install it manually

Describe the solution you'd like create a container share a folder with netatalk where the config folder is accessed

Describe alternatives you've considered to restart netatalk after the config changes, you can issue a command to the netatalk container To do this you must install Docker daemon in the webmin container by mounting the Docker socket

docker run -v /var/run/docker.sock:/var/run/docker.sock -it webmin-container-name

then you can run docker commands from webmin like:

docker kill --signal=SIGHUP netatalk-container-name (or id)

Be aware that exposing docker sockets is considered insecure in a production environment or in an uncontrolled network.

Additional context optionally you can add a parallel task in the netatalk container that restarts it when the config file changes

pferronato avatar Sep 12 '24 09:09 pferronato

Thanks for filing the ticket. For posterity, this came out of a discussion thread over at https://68kmla.org/bb/index.php?threads/netatalk-2-4-0-available.47708/post-540976

The thread has some more concrete ideas potential solutions.

rdmark avatar Sep 18 '24 08:09 rdmark

A solution for this has been merged to main. After some experimentation, I chose the afp.conf polling solution. A simple shell script is run as a background process, and does a checksum check every n seconds, where n can be set with the AFP_CONFIG_POLL env variable.

One constraint here is that we only do polling on afp.conf. For all the other config files, the container has to be restarted for changes to take effect.

A sample docker compose config can be found at https://github.com/Netatalk/netatalk/blob/main/DOCKER.md#webmin-module

Containers are published at the GH registry: https://github.com/Netatalk/netatalk/pkgs/container/netatalk-webmin

rdmark avatar Apr 21 '25 13:04 rdmark