diff --git a/Dockerfile b/Dockerfile index 6ff4e2a1..6da101f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,8 +24,8 @@ RUN npm ci --no-optional RUN cp config.cli.js config.js RUN npm pack -# Now get the clean image -FROM ${NODE_IMAGE} as flood +# Now get the clean Node.js image +FROM ${NODE_IMAGE} as install # Copy package built COPY --from=nodebuild /usr/src/app/flood-*.tgz /tmp/ @@ -51,6 +51,11 @@ RUN rm -rf /opt/* # Remove Node.js development files RUN rm -rf /usr/local/include/node +# Get the scratch image +FROM scratch as flood + +COPY --from=install / / + # Create "download" user RUN adduser -h /home/download -s /sbin/nologin --disabled-password download