Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

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
Loading