Skip to content

Commit

Permalink
Merge pull request #222 from privacy-scaling-explorations/docker-upda…
Browse files Browse the repository at this point in the history
…te-2

docker update
  • Loading branch information
kalidiagne authored Oct 30, 2024
2 parents f1340ed + 1875517 commit c1ae0b0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ FROM node:18-alpine3.18 as builder
RUN apk add --no-cache git curl

WORKDIR /builder

COPY package.json yarn.lock ./
RUN npm i -g yarn && yarn install

COPY . .
RUN npm i -g yarn
RUN yarn install
RUN yarn build

# Create image by copying build artifacts
FROM node:18-alpine3.18 as runner
RUN npm i -g yarn

USER node
ARG PORT=3000

WORKDIR /home/node
COPY --chown=node:node --from=builder /builder/ ./

ARG PORT=3000
EXPOSE ${PORT}
CMD ["yarn", "start"]

0 comments on commit c1ae0b0

Please sign in to comment.