fix: improve openssl installation logic in Dockerfile for better compatibility
Build and Push Docker Image / build (push) Failing after 5m8s

This commit is contained in:
hwinkel
2026-04-25 13:45:08 +02:00
parent c412388877
commit e526e7fd2d
+10 -2
View File
@@ -3,7 +3,11 @@ FROM node:alpine AS builder
WORKDIR /app WORKDIR /app
RUN apk add --no-cache openssl RUN if command -v apk >/dev/null 2>&1; then \
apk add --no-cache openssl; \
elif command -v apt-get >/dev/null 2>&1; then \
apt-get update && apt-get install -y --no-install-recommends openssl ca-certificates && rm -rf /var/lib/apt/lists/*; \
fi
COPY package*.json ./ COPY package*.json ./
RUN npm ci RUN npm ci
@@ -25,7 +29,11 @@ WORKDIR /app
ENV NODE_ENV=production ENV NODE_ENV=production
RUN apk add --no-cache openssl RUN if command -v apk >/dev/null 2>&1; then \
apk add --no-cache openssl; \
elif command -v apt-get >/dev/null 2>&1; then \
apt-get update && apt-get install -y --no-install-recommends openssl ca-certificates && rm -rf /var/lib/apt/lists/*; \
fi
COPY package*.json ./ COPY package*.json ./
RUN npm ci --omit=dev RUN npm ci --omit=dev