Fixed wrong rootdir
Build and Push Alpine NGINX Image to docker.io Registry / Build and push image (root user) (push) Successful in 51s
Details
Build and Push Alpine NGINX Image to docker.io Registry / Build and push image (rootless) (push) Successful in 57s
Details
Build and Push Alpine NodeJS Image to Winter Access Registry / Build and push image (Root User) (push) Successful in 14s
Details
Build and Push Alpine NodeJS Image to Winter Access Registry / Build and push image (rootless) (push) Successful in 14s
Details
Build and Push Alpine NGINX Image to docker.io Registry / Build and push image (root user) (push) Successful in 51s
Details
Build and Push Alpine NGINX Image to docker.io Registry / Build and push image (rootless) (push) Successful in 57s
Details
Build and Push Alpine NodeJS Image to Winter Access Registry / Build and push image (Root User) (push) Successful in 14s
Details
Build and Push Alpine NodeJS Image to Winter Access Registry / Build and push image (rootless) (push) Successful in 14s
Details
This commit is contained in:
parent
c41cb37409
commit
f3421d323c
|
@ -4,6 +4,8 @@ ARG ALPINE_VERSION=3.20
|
|||
FROM ${REGISTRY_URL}/alpine:${ALPINE_VERSION}
|
||||
LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# INSTALL WGET AND REQUIRED BUILD TOOLS
|
||||
RUN --mount=type=cache,target=/var/cache/apk \
|
||||
apk update && apk upgrade && apk add \
|
||||
|
@ -22,8 +24,6 @@ ADD ./app .
|
|||
RUN apk del curl && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
CMD ["nginx"]
|
||||
|
||||
EXPOSE 80
|
|
@ -4,6 +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 /sbin/nologin -h /app nginx
|
||||
|
||||
|
@ -28,9 +30,6 @@ RUN chown -R nginx:nginx /app && \
|
|||
RUN apk del curl && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
# SET AS USER NODE
|
||||
WORKDIR /app
|
||||
|
||||
USER nginx
|
||||
|
||||
CMD ["nginx"]
|
||||
|
|
Loading…
Reference in New Issue