Skip to content

Run as root by default to fix docker socket access#58

Merged
umputun merged 2 commits intoumputun:masterfrom
paskal:fix-default-root-user
Mar 1, 2026
Merged

Run as root by default to fix docker socket access#58
umputun merged 2 commits intoumputun:masterfrom
paskal:fix-default-root-user

Conversation

@paskal
Copy link
Copy Markdown
Contributor

@paskal paskal commented Feb 28, 2026

Summary

  • Set APP_UID=0 in the Dockerfile to run as root by default, restoring v1.3.0 behaviour. The updated baseimage switched to non-root execution (UID 1001) which broke docker socket access on most systems where the socket GID doesn't match the container's default docker group GID (999).
  • Added commented-out APP_UID and DOCKER_GID options to docker-compose.yml with an explanation of how to run as non-root.
  • Added a "Running as Non-Root" section to README with instructions on finding the host's docker socket GID and configuring the container accordingly.
  • Removed unnecessary chown -R app:app /srv from Dockerfile (redundant when running as root).
  • Removed obsolete version: '2' from docker-compose.yml, uncommented TIME_ZONE.
  • Fixed asAS casing in Dockerfile multi-stage build.

Resolves #57

Previously, the container ran as non-root user app (UID 1001) which
failed on most systems because the docker socket GID didn't match
the container's docker group GID (999). The v1.3.0 image ran as root
and worked out of the box; v1.4.0 switched to non-root via the
updated baseimage and broke existing setups.

Set APP_UID=0 in the Dockerfile to restore root execution as default.
Add documented APP_UID/DOCKER_GID options in docker-compose.yml and
a "Running as Non-Root" section in README for users who prefer to
drop privileges.

Resolves #57
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 28, 2026

Pull Request Test Coverage Report for Build 22531343651

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 79.339%

Totals Coverage Status
Change from base Build 22087878407: 0.0%
Covered Lines: 384
Relevant Lines: 484

💛 - Coveralls

Copy link
Copy Markdown
Owner

@umputun umputun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good overall, thx. one thing - TIME_ZONE=America/Chicago got uncommented in docker-compose.yml, so now it's active by default. seems unrelated to the root/non-root fix, probably should stay commented out

@paskal
Copy link
Copy Markdown
Contributor Author

paskal commented Feb 28, 2026

Done, please take a look.

Copy link
Copy Markdown
Owner

@umputun umputun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thx

@umputun umputun merged commit d4e7080 into umputun:master Mar 1, 2026
4 checks passed
@paskal paskal deleted the fix-default-root-user branch March 1, 2026 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Container v1.4.0 does not start.

3 participants