Skip to content

Commit

Permalink
Use alpine and production dependencies, but cleanup build dependencie…
Browse files Browse the repository at this point in the history
…s afterward.
  • Loading branch information
simonlary committed Jan 2, 2024
1 parent 8db79b2 commit daae9de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ FROM node:20-alpine
WORKDIR /app
ENV NODE_ENV=production
COPY package*.json ./
RUN npm ci
# We need to install `alpine-sdk` and `python3` to build `@discordjs/opus`
RUN apk add --no-cache --virtual .build-deps alpine-sdk python3 \
&& npm ci --production \
&& apk del .build-deps
COPY --from=builder /app/out ./out
CMD [ "node", "out/index.js" ]

0 comments on commit daae9de

Please sign in to comment.