Skip to content

Add non root user to Dockerfiles#11028

Merged
mo3rfan merged 3 commits intogeosolutions-it:masterfrom
mo3rfan:runas_non_root
May 6, 2025
Merged

Add non root user to Dockerfiles#11028
mo3rfan merged 3 commits intogeosolutions-it:masterfrom
mo3rfan:runas_non_root

Conversation

@mo3rfan
Copy link
Copy Markdown
Contributor

@mo3rfan mo3rfan commented Apr 17, 2025

Description

Runs the containers as non root user by default while also giving the user the ability to configure UID, GID and username of the user. Any mounted path that will be used will also need to be chown-ed by this user.

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

What is the current behavior?

Fixes #11027

What is the new behavior?

Tomcat process runs as the custom UID. (by default 1001)

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

@mo3rfan mo3rfan self-assigned this Apr 17, 2025
@mo3rfan mo3rfan requested a review from randomorder April 17, 2025 07:44
Setting a custom user may not be ideal here for postgis but specifying postgres instead of root works as that's already created.
@mo3rfan mo3rfan merged commit 31bb0e2 into geosolutions-it:master May 6, 2025
6 checks passed
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.

Security: Container runs as root user by default

3 participants