Skip to content

Commit 945a009

Browse files
Jonathan S. Katzjkatz
authored andcommitted
Set the pgo-backrest-repo container to run as OS user "2000"
A container instantiated with the "runAsNonRoot" is unable to verify that the "pgbackrest" user is a non-root OS user. The fix for this is to explicitly specify the numeric ID associated with the user account in order for "runAsNonRoot" to verify that this is not a root account. Issue: [ch5510]
1 parent f2d8718 commit 945a009

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

centos7/Dockerfile.pgo-backrest-repo.centos7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ RUN chmod g=u /etc/passwd && \
3535

3636
RUN mkdir /.ssh && chown pgbackrest:pgbackrest /.ssh && chmod o+rwx /.ssh
3737

38-
USER pgbackrest
38+
USER 2000
3939

4040
ENTRYPOINT ["/opt/cpm/bin/uid_pgbackrest.sh"]
4141

rhel7/Dockerfile.pgo-backrest-repo.rhel7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN chmod g=u /etc/passwd && \
3434

3535
RUN mkdir /.ssh && chown pgbackrest:pgbackrest /.ssh && chmod o+rwx /.ssh
3636

37-
USER pgbackrest
37+
USER 2000
3838

3939
ENTRYPOINT ["/opt/cpm/bin/uid_pgbackrest.sh"]
4040
VOLUME ["/sshd", "/backrestrepo" ]

ubi7/Dockerfile.pgo-backrest-repo.ubi7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN chmod g=u /etc/passwd && \
3434

3535
RUN mkdir /.ssh && chown pgbackrest:pgbackrest /.ssh && chmod o+rwx /.ssh
3636

37-
USER pgbackrest
37+
USER 2000
3838

3939
ENTRYPOINT ["/opt/cpm/bin/uid_pgbackrest.sh"]
4040
VOLUME ["/sshd", "/backrestrepo" ]

0 commit comments

Comments
 (0)