Fixed group in dockerfile
Build and Push Alpine Image / Build and push image (root-user) (push) Successful in 57s Details
Build and Push Alpine Image / Build and push image (rootless) (push) Successful in 55s Details
Build and Push Ubuntu Image / Build and push image (root) (push) Successful in 1m3s Details
Build and Push Ubuntu Image / Build and push image (rootless) (push) Successful in 2m24s Details

This commit is contained in:
Aditya Prima 2024-09-12 04:45:10 +07:00
parent 60f75abe09
commit 076e8c588f
1 changed files with 3 additions and 3 deletions

View File

@ -7,13 +7,13 @@ LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com"
ENV PHP_FPM_BIN=php-fpm${PHP_VERSION}
# ADD USER
RUN groupadd -g 10001 phpuser && useradd -M -u 10001 -G phpuser -s /bin/sh -d /app phpuser
RUN groupadd -g 10001 phpfpm && useradd -M -u 10001 -g 10001 -s /bin/sh -d /app phpfpm
# Set workdir
WORKDIR /
# CREATE FUTURE WORKDIR
RUN mkdir -p /app && chown phpuser:phpuser /app
RUN mkdir -p /app && chown phpfpm:phpfpm /app
# INSTALL BASE DEPENDENCIES
RUN --mount=type=cache,target=/var/cache/apt/archives \
@ -40,7 +40,7 @@ RUN apt -y clean
# SET USER WORKDIR
WORKDIR /app
USER phpuser
USER phpfpm
EXPOSE 9000