Skip to content

Commit

Permalink
build/update dockerfile (#206)
Browse files Browse the repository at this point in the history
* build: update node version and unpin debian version

* build: install openssl in node-slim image

This is a known issue in Docker Node image nodejs/docker-node#1919.
  • Loading branch information
samhwang committed Mar 7, 2024
1 parent 5557b19 commit 12343f4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Dockerfile
@@ -1,11 +1,11 @@
################
# Build assets #
################
FROM node:20.5-bullseye as build
FROM node:20.10 as build
WORKDIR /app

# Install global node modules: pnpm
RUN npm install -g pnpm@8.15.1
RUN npm install -g pnpm@8.15

# Install Node modules
COPY package.json pnpm-lock.yaml ./
Expand All @@ -23,9 +23,16 @@ RUN pnpm build
####################
# Production image #
####################
FROM node:20.5-bullseye-slim as production
FROM node:20.10-slim as production
WORKDIR /app

RUN set -xe && \
apt-get update && \
apt-get install -y --no-install-recommends openssl && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /usr/share/man/* /usr/share/doc/*

COPY --chown=node:node --from=build /app/build build

USER node
Expand Down

0 comments on commit 12343f4

Please sign in to comment.