Skip to content

Commit b41802d

Browse files
committed
RHOAIENG-21691: mitigate undesirable /opt/app-root ownership and permissions change caused by a Dockerfile COPY
Before: ``` podman run --entrypoint /bin/bash --rm -it 7616b6ee0ff8 -c 'ls -AlFd $VIRTUAL_ENV' drwxrwxr-x. 1 default root 40 Mar 16 09:57 /opt/app-root/ ``` The Dockerfile command causing trouble: ``` USER 0 # Copy extra files to the image. COPY ${RSTUDIO_SOURCE_CODE}/nginx/root/ / ``` After: ``` podman run --entrypoint /bin/bash --rm -it 237a5692c108 -c 'ls -AlFd $VIRTUAL_ENV' drwxr-xr-x. 1 root root 38 Mar 14 14:16 /opt/app-root/ ```
1 parent 1bd07a6 commit b41802d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: codeserver/ubi9-python-3.11/Dockerfile.cpu

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ RUN yum install -y https://download.fedoraproject.org/pub/epel/epel-release-late
8181
COPY --chown=1001:0 ${CODESERVER_SOURCE_CODE}/supervisord/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
8282

8383
# Copy extra files to the image.
84-
COPY ${CODESERVER_SOURCE_CODE}/nginx/root/ /
84+
COPY --chown=1001:0 ${CODESERVER_SOURCE_CODE}/nginx/root/ /
8585

8686
# Changing ownership and user rights to support following use-cases:
8787
# 1) running container on OpenShift, whose default security model

Diff for: rstudio/c9s-python-3.11/Dockerfile.cpu

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ RUN yum -y module enable nginx:$NGINX_VERSION && \
115115
COPY --chown=1001:0 ${RSTUDIO_SOURCE_CODE}/supervisord/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
116116

117117
# Copy extra files to the image.
118-
COPY ${RSTUDIO_SOURCE_CODE}/nginx/root/ /
118+
COPY --chown=1001:0 ${RSTUDIO_SOURCE_CODE}/nginx/root/ /
119119

120120
# Changing ownership and user rights to support following use-cases:
121121
# 1) running container on OpenShift, whose default security model

Diff for: rstudio/c9s-python-3.11/Dockerfile.cuda

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ RUN yum -y module enable nginx:$NGINX_VERSION && \
239239
COPY --chown=1001:0 ${RSTUDIO_SOURCE_CODE}/supervisord/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
240240

241241
# Copy extra files to the image.
242-
COPY ${RSTUDIO_SOURCE_CODE}/nginx/root/ /
242+
COPY --chown=1001:0 ${RSTUDIO_SOURCE_CODE}/nginx/root/ /
243243

244244
# Changing ownership and user rights to support following use-cases:
245245
# 1) running container on OpenShift, whose default security model

0 commit comments

Comments
 (0)