Skip to content

Commit

Permalink
Change: use uid/gid 10002 for postgres (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalholthaus authored Feb 13, 2025
1 parent 1ede68b commit 0972212
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,12 @@ ENV PGDATAOLD /var/lib/postgresql/data
ENV PGDATANEW /var/lib/postgresql/${POSTGRES_VERSION}/data

Check warning on line 33 in Dockerfile

View workflow job for this annotation

GitHub Actions / upgrade-postgres (16, ["asset-management-postgres", "vulnerability-intelligence-postgres", "opens... / push-postgres / push-postgres

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 33 in Dockerfile

View workflow job for this annotation

GitHub Actions / upgrade-postgres (17, ["opensight-keycloak-postgres"]) / push-postgres / push-postgres

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

COPY bin/upgradeversion.sh /usr/local/bin/upgradeversion

# We decided to use our own UID range.
# INFO: https://github.com/greenbone/automatix/blob/main/README.md
# Change to user root user to run the commands.
USER 0:0
RUN groupmod -g 10002 postgres && usermod -u 10002 -g 10002 postgres && \
find / -uid 999 -not -path "/proc/*" -exec chown 10002 {} \; && \
find / -gid 999 -not -path "/proc/*" -exec chown :10002 {} \;
USER 10002:10002

0 comments on commit 0972212

Please sign in to comment.