removed run commands

This commit is contained in:
lllllllillllllillll 2023-11-18 22:17:58 -08:00 committed by GitHub
parent 36d769c660
commit 2eafda0c09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,8 +1,3 @@
# syntax=docker/dockerfile:1
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Dockerfile reference guide at
# https://docs.docker.com/engine/reference/builder/
ARG NODE_VERSION=20.0.0 ARG NODE_VERSION=20.0.0
@ -14,14 +9,10 @@ ENV NODE_ENV production
WORKDIR /app WORKDIR /app
# Download dependencies as a separate step to take advantage of Docker's caching. # RUN --mount=type=bind,source=package.json,target=package.json \
# Leverage a cache mount to /root/.npm to speed up subsequent builds. # --mount=type=bind,source=package-lock.json,target=package-lock.json \
# Leverage a bind mounts to package.json and package-lock.json to avoid having to copy them into # --mount=type=cache,target=/root/.npm \
# into this layer. # npm ci --omit=dev
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
npm ci --omit=dev
# Run the application as a non-root user. # Run the application as a non-root user.
USER root USER root