Skip to content

Commit

Permalink
fix: add git to Dockerfile build container
Browse files Browse the repository at this point in the history
  • Loading branch information
btlghrants committed Oct 27, 2023
1 parent 733a354 commit f530581
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Copy the built files and node_modules into a new image
FROM cgr.dev/chainguard/node:20@sha256:f30d39c6980f0a50119f2aa269498307a80c2654928d8e23bb25431b9cbbdc4f
### BUILD ###

FROM docker.io/library/node:20-alpine as with-git

WORKDIR /app

# install git
RUN apk --no-cache add git

# Copy the node config files
COPY --chown=node:node ./package*.json ./

Expand All @@ -21,3 +25,12 @@ RUN npm ci --omit=dev --omit=peer && \
# Sync the pepr dist files
COPY --chown=node:node ./dist/ ./node_modules/pepr/dist/
COPY --chown=node:node ./package.json ./node_modules/pepr/package.json


##### DELIVER #####

FROM cgr.dev/chainguard/node:20@sha256:f30d39c6980f0a50119f2aa269498307a80c2654928d8e23bb25431b9cbbdc4f

WORKDIR /app

COPY --from=with-git --chown=node:node /app/ /app/

0 comments on commit f530581

Please sign in to comment.