diff --git a/Dockerfile.alpine-rootless b/Dockerfile.alpine-rootless index 4181286..6be6f1a 100644 --- a/Dockerfile.alpine-rootless +++ b/Dockerfile.alpine-rootless @@ -4,10 +4,8 @@ ARG ALPINE_VERSION=3.20 FROM ${REGISTRY_URL}/alpine:${ALPINE_VERSION} LABEL maintainer=" 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 \ No newline at end of file