Updated nginx rootless dockerfile
Build and Push Alpine NGINX Image to docker.io Registry / Build and push image (root user) (push) Successful in 41s
Details
Build and Push Alpine NGINX Image to docker.io Registry / Build and push image (rootless) (push) Successful in 1m8s
Details
Build and Push Alpine NodeJS Image to Winter Access Registry / Build and push image (Root User) (push) Successful in 16s
Details
Build and Push Alpine NodeJS Image to Winter Access Registry / Build and push image (rootless) (push) Successful in 16s
Details
Build and Push Alpine NGINX Image to docker.io Registry / Build and push image (root user) (push) Successful in 41s
Details
Build and Push Alpine NGINX Image to docker.io Registry / Build and push image (rootless) (push) Successful in 1m8s
Details
Build and Push Alpine NodeJS Image to Winter Access Registry / Build and push image (Root User) (push) Successful in 16s
Details
Build and Push Alpine NodeJS Image to Winter Access Registry / Build and push image (rootless) (push) Successful in 16s
Details
This commit is contained in:
parent
6bf314f188
commit
808beb645b
|
@ -4,10 +4,8 @@ ARG ALPINE_VERSION=3.20
|
|||
FROM ${REGISTRY_URL}/alpine:${ALPINE_VERSION}
|
||||
LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# ADD USER
|
||||
RUN addgroup -g 10001 nginx && adduser -D -u 10001 -G nginx -s /bin/bash -h /app nginx
|
||||
RUN addgroup -g 10001 nginx && adduser -D -u 10001 -G nginx -s /sbin/nologin -h /app nginx
|
||||
|
||||
# INSTALL WGET AND REQUIRED BUILD TOOLS
|
||||
RUN --mount=type=cache,target=/var/cache/apk \
|
||||
|
@ -31,8 +29,9 @@ RUN apk del curl && \
|
|||
|
||||
# SET AS USER NODE
|
||||
WORKDIR /app
|
||||
|
||||
USER nginx
|
||||
|
||||
CMD ["nginx"]
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
EXPOSE 80
|
Loading…
Reference in New Issue