Skip to content

Commit

Permalink
Fix syntax in Dockerfile chown commands
Browse files Browse the repository at this point in the history
The Dockerfile has been updated to correctly use the --chown flag when copying files. The change ensures that the copied files have the correct ownership assigned. This fix improves our container build process and avoids potential permission issues.
  • Loading branch information
nbejansen committed May 2, 2024
1 parent 79cfc36 commit 964492a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN /runtime/bin/install curl xz-utils ca-certificates \
&& curl -L https://github.com/jwilder/dockerize/releases/download/${DOCKERIZE_VERSION}/dockerize-linux-${TARGETARCH}-${DOCKERIZE_VERSION}.tar.gz -o - | tar xzf - -C /runtime/bin \
&& chown -R $RUNTIME_UID:$RUNTIME_GID /etc/s6-overlay/s6-rc.d/user

COPY --chown $RUNTIME_UID:$RUNTIME_GID ./runtime /
COPY --chown=$RUNTIME_UID:$RUNTIME_GID ./runtime /

USER ${RUNTIME_UID}

Expand Down Expand Up @@ -57,7 +57,7 @@ RUN /runtime/bin/install gnupg2 software-properties-common less msmtp unzip \
&& /runtime/bin/install $(cat /runtime/packages/php-${BUILD_VERSION}.txt) \
&& /runtime/bin/rchown /etc/php/current

COPY --chown $RUNTIME_UID:$RUNTIME_GID ./php /
COPY --chown=$RUNTIME_UID:$RUNTIME_GID ./php /

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer

Expand All @@ -78,7 +78,7 @@ RUN /runtime/bin/install php${BUILD_VERSION}-fpm libfcgi-bin \
&& rm /etc/php/current/fpm/pool.d/www.conf \
&& /runtime/bin/rchown /etc/php/current

COPY --chown $RUNTIME_UID:$RUNTIME_GID ./php-fpm /
COPY --chown=$RUNTIME_UID:$RUNTIME_GID ./php-fpm /

USER $RUNTIME_UID

Expand All @@ -100,7 +100,7 @@ RUN /runtime/bin/install nginx \
&& /runtime/bin/rchown /etc/nginx /var/log/nginx /var/lib/nginx \
&& setcap "cap_net_bind_service=+ep" /usr/sbin/nginx

COPY --chown $RUNTIME_UID:$RUNTIME_GID ./php-nginx /
COPY --chown=$RUNTIME_UID:$RUNTIME_GID ./php-nginx /

USER $RUNTIME_UID

Expand All @@ -127,7 +127,7 @@ RUN curl http://rpms.litespeedtech.com/debian/lst_debian_repo.gpg -o /etc/apt/tr
&& /runtime/bin/rchown /usr/local/lsws \
&& setcap "cap_net_bind_service=+ep" /usr/local/lsws/bin/openlitespeed

COPY --chown $RUNTIME_UID:$RUNTIME_GID ./php-ols /
COPY --chown=$RUNTIME_UID:$RUNTIME_GID ./php-ols /

USER $RUNTIME_UID

Expand Down

0 comments on commit 964492a

Please sign in to comment.