Updated CMD for rootless nginx
Build and Push Alpine NGINX Image to docker.io Registry / Build and push image (root user) (push) Successful in 1m0s Details
Build and Push Alpine NGINX Image to docker.io Registry / Build and push image (rootless) (push) Successful in 1m0s 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 37s Details

This commit is contained in:
Aditya Prima 2024-09-12 00:46:44 +07:00
parent 808beb645b
commit 50ad127b53
2 changed files with 3 additions and 3 deletions

View File

@ -4,8 +4,6 @@ ARG ALPINE_VERSION=3.20
FROM ${REGISTRY_URL}/alpine:${ALPINE_VERSION} FROM ${REGISTRY_URL}/alpine:${ALPINE_VERSION}
LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com" LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com"
WORKDIR /app
# INSTALL WGET AND REQUIRED BUILD TOOLS # INSTALL WGET AND REQUIRED BUILD TOOLS
RUN --mount=type=cache,target=/var/cache/apk \ RUN --mount=type=cache,target=/var/cache/apk \
apk update && apk upgrade && apk add \ apk update && apk upgrade && apk add \
@ -24,6 +22,8 @@ ADD ./app .
RUN apk del curl && \ RUN apk del curl && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
WORKDIR /app
CMD ["nginx"] CMD ["nginx"]
EXPOSE 80 EXPOSE 80

View File

@ -32,6 +32,6 @@ WORKDIR /app
USER nginx USER nginx
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx"]
EXPOSE 80 EXPOSE 80