Skip to content

Commit

Permalink
removed run commands
Browse files Browse the repository at this point in the history
  • Loading branch information
lllllllillllllillll authored Nov 19, 2023
1 parent 36d769c commit 2eafda0
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down

0 comments on commit 2eafda0

Please sign in to comment.