Switch to alpine
All checks were successful
Publish Docker Image / Publish Docker Image (push) Successful in 43s

This commit is contained in:
2025-05-01 21:41:35 -04:00
parent 1f9f11e1be
commit 979cf7320e

View File

@ -1,15 +1,13 @@
# base
# ----
FROM node:20-bookworm-slim AS base
FROM node:lts-alpine AS base
RUN corepack enable
# We tried to make the Dockerfile as lean as possible. In some cases, that means we excluded a dependency your project needs.
# By far the most common is Python. If you're running into build errors because `python3` isn't available,
# add `python3 make gcc \` before the `openssl \` line below and in other stages as necessary:
RUN apt-get update && apt-get install -y \
openssl \
&& rm -rf /var/lib/apt/lists/*
RUN apk add openssl
USER node
WORKDIR /home/node/app
@ -96,13 +94,11 @@ RUN yarn rw build web --no-prerender
# api serve
# ---------
FROM node:20-bookworm-slim AS api_serve
FROM node:lts-alpine AS api_serve
RUN corepack enable
RUN apt-get update && apt-get install -y \
openssl \
&& rm -rf /var/lib/apt/lists/*
RUN apk add openssl
USER node
WORKDIR /home/node/app
@ -142,7 +138,7 @@ CMD [ "./api/dist/server.js" ]
# web serve
# ---------
FROM node:20-bookworm-slim AS web_serve
FROM node:lts-alpine AS web_serve
RUN corepack enable