jhalter / mobius

A Hotline server implemented in Golang for macOS, Linux, and Windows operating systems
MIT License
73 stars 8 forks source link

Remove hardcoded user from Dockerfile #140

Closed jhalter closed 2 months ago

jhalter commented 2 months ago

This reverts the Dockerfile change in #111 to run the server as a non-root user by default, for two reasons:

1) Most users of the Docker image do not build the image themselves from the Dockerfile, so including a hardcoded UID/GID in the Docker image means they will always have to pass the --user flag to override the hardcoded user to something specific to their system, or else open up file permissions. This came up in #124.

2) Using the debian-stable image to run the adduser command increases the image size by >10x.

As an alternative, I've updated the README doc with a recommendation to run the image with the --user flag.