Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom UID/GID in docker (AKA don't run the server as root) #1227

Open
denilsonsa opened this issue Feb 4, 2024 · 0 comments
Open

Comments

@denilsonsa
Copy link

Describe the bug

Following the current docker-compose instructions from https://hub.docker.com/r/athou/commafeed, the server will be running as the root user. That's a security issue, and we should always avoid running processes as root.

To Reproduce

Steps to reproduce the behavior:

  1. Create a docker-compose.yml file following the instructions from https://hub.docker.com/r/athou/commafeed.
  2. docker compose up -d
  3. htop, search for commafeed; or docker compose top

Expected behavior

It should run as its own user. Bonus points for having the UID/GID configurable.

Configurable UID:GID is needed if the person is mounting /commafeed/data as a volume, because it will match the permissions for that path. (By the way, this should be in the basic configuration example.)

Screenshots

$ docker compose top
commafeed-commafeed-1
UID    PID      PPID     C    STIME   TTY   TIME       CMD
root   637880   637860   9    08:53   ?     00:00:22   java -jar commafeed.jar server config.yml   

Environment (please complete the following information):

  • CommaFeed version (or "commafeed.com"): latest
  • Browser [e.g. chrome, firefox]: N/A
  • Device [e.g. desktop, mobile]: N/A

Additional context

You could consider following the structure of the many other images from LinuxServer.IO. Those images always run as a configurable normal user and even have a configurable timezone.

If you go through that route, you can contribute your image to their project. Not only it will be easy to setup for most people, but also gives some exposure as something linked from and supported by LSIO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants