Skip to content

Commit 09ecff2

Browse files
committed
fix: resolve minor inconsistencies in COPY and chmod
This change does two things: * Makes COPY commands consistent across Dockerfile files * Uses `find` to execute chmod in case a directory is empty Signed-off-by: Elijah Zupancic <[email protected]>
1 parent bc2535b commit 09ecff2

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Dockerfile.buildkit.plus

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,5 @@ COPY common/docker-entrypoint.d /docker-entrypoint.d/
9090
RUN set -x \
9191
&& mkdir -p /var/cache/nginx/s3_proxy \
9292
&& chown nginx:nginx /var/cache/nginx/s3_proxy \
93-
&& chmod -R -v +x /docker-entrypoint.sh /docker-entrypoint.d/*.sh;
93+
&& chmod -v +x /docker-entrypoint.sh \
94+
&& find /docker-entrypoint.d -type f -name '*.sh' -exec chmod -v +x {} \;

Dockerfile.oss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ RUN set -x \
3535
nginx-module-njs=${NGINX_VERSION}+${NJS_VERSION}-${NJS_RELEASE} \
3636
&& apt-get remove --purge --auto-remove -y && rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/nginx.list
3737

38-
COPY oss/etc /etc
38+
COPY oss/etc/nginx /etc/nginx
3939
COPY common/etc /etc
4040
COPY common/docker-entrypoint.sh /docker-entrypoint.sh
4141
COPY common/docker-entrypoint.d /docker-entrypoint.d/
4242

4343
RUN set -x \
4444
&& mkdir -p /var/cache/nginx/s3_proxy \
4545
&& chown nginx:nginx /var/cache/nginx/s3_proxy \
46-
&& chmod -R -v +x /docker-entrypoint.sh /docker-entrypoint.d/*.sh;
46+
&& chmod -v +x /docker-entrypoint.sh /docker-entrypoint.d/*.sh \
47+
&& find /docker-entrypoint.d -type f -name '*.sh' -exec chmod -v +x {} \;

Dockerfile.plus

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ RUN set -x \
8383
COPY plus/etc/nginx /etc/nginx
8484
COPY common/etc /etc
8585
COPY common/docker-entrypoint.sh /docker-entrypoint.sh
86+
COPY common/docker-entrypoint.d /docker-entrypoint.d/
8687

8788
RUN set -x \
8889
&& mkdir -p /var/cache/nginx/s3_proxy \
8990
&& chown nginx:nginx /var/cache/nginx/s3_proxy \
90-
&& chmod -R -v +x /docker-entrypoint.sh /docker-entrypoint.d/*.sh;
91+
&& chmod -R -v +x /docker-entrypoint.sh /docker-entrypoint.d/*.sh \
92+
&& find /docker-entrypoint.d -type f -name '*.sh' -exec chmod -v +x {} \;

0 commit comments

Comments
 (0)