removed run commands
This commit is contained in:
parent
36d769c660
commit
2eafda0c09
1 changed files with 4 additions and 13 deletions
17
Dockerfile
17
Dockerfile
|
@ -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
|
||||
|
||||
|
@ -14,14 +9,10 @@ ENV NODE_ENV production
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
# Download dependencies as a separate step to take advantage of Docker's caching.
|
||||
# Leverage a cache mount to /root/.npm to speed up subsequent builds.
|
||||
# Leverage a bind mounts to package.json and package-lock.json to avoid having to copy them into
|
||||
# into this layer.
|
||||
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 --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.
|
||||
USER root
|
||||
|
|
Loading…
Add table
Reference in a new issue