Updated rootless to use user 10001 and group 10001
Build and Push Alpine NGINX Image to docker.io Registry / Build and push image (root user) (push) Successful in 53s Details
Build and Push Alpine NGINX Image to docker.io Registry / Build and push image (rootless) (push) Successful in 59s Details
Build and Push Alpine NodeJS Image to Winter Access Registry / Build and push image (Root User) (push) Successful in 13s Details
Build and Push Alpine NodeJS Image to Winter Access Registry / Build and push image (rootless) (push) Successful in 13s Details

This commit is contained in:
Aditya Prima 2024-07-23 18:36:22 +07:00
parent aa99a45889
commit 48de0fa129
2 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,7 @@ ARG ALPINE_VERSION=3.20
FROM ${REGISTRY_URL}/alpine:${ALPINE_VERSION}
LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com"
WORKDIR /
WORKDIR /app
# INSTALL WGET AND REQUIRED BUILD TOOLS
RUN --mount=type=cache,target=/var/cache/apk \
@ -18,7 +18,7 @@ ADD ./etc/nginx/proxy_params /etc/nginx/
ADD ./etc/nginx/ssl_params /etc/nginx/
ADD ./etc/nginx/conf.d /etc/nginx/conf.d
ADD ./app /app
ADD ./app .
# CLEAR CACHE
RUN apk del curl && \

View File

@ -4,10 +4,10 @@ ARG ALPINE_VERSION=3.20
FROM ${REGISTRY_URL}/alpine:${ALPINE_VERSION}
LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com"
WORKDIR /
WORKDIR /app
# ADD USER
RUN addgroup -g 1001 nginx && adduser -D -u 1001 -G nginx -s /bin/bash -h /app nginx
RUN addgroup -g 10001 nginx && adduser -D -u 10001 -G nginx -s /bin/bash -h /app nginx
# INSTALL WGET AND REQUIRED BUILD TOOLS
RUN --mount=type=cache,target=/var/cache/apk \
@ -21,7 +21,7 @@ ADD ./etc/nginx/proxy_params /etc/nginx/
ADD ./etc/nginx/ssl_params /etc/nginx/
ADD ./etc/nginx/conf.d /etc/nginx/conf.d
ADD ./app /app
ADD ./app .
RUN touch /var/run/nginx.pid && chown nginx:nginx /var/run/nginx.pid
@ -33,6 +33,6 @@ RUN apk del curl && \
WORKDIR /app
USER nginx
# CMD ["nginx"]
CMD ["nginx"]
EXPOSE 80