fix(backend): explicitly set USER root for apk add openssl in Dockerfile
Some checks failed
Deploy Canina / deploy (push) Failing after 1m46s

This commit is contained in:
parsa aghaei 2026-08-15 16:12:16 +03:30
parent 034d4c71b0
commit cfc41e349d

View File

@ -1,5 +1,6 @@
FROM node:20-alpine AS builder
RUN http_proxy=http://172.17.0.1:8888 https_proxy=http://172.17.0.1:8888 apk add --no-cache openssl 2>/dev/null || apk add --no-cache openssl 2>/dev/null || true
USER root
RUN http_proxy=http://172.17.0.1:8888 https_proxy=http://172.17.0.1:8888 apk add --no-cache openssl || apk add --no-cache openssl || true
WORKDIR /app
ENV PRISMA_SKIP_POSTINSTALL_GENERATE=true
@ -17,7 +18,8 @@ COPY . .
RUN ./node_modules/.bin/prisma generate && npm run build
FROM node:20-alpine
RUN http_proxy=http://172.17.0.1:8888 https_proxy=http://172.17.0.1:8888 apk add --no-cache openssl 2>/dev/null || apk add --no-cache openssl 2>/dev/null || true
USER root
RUN http_proxy=http://172.17.0.1:8888 https_proxy=http://172.17.0.1:8888 apk add --no-cache openssl || apk add --no-cache openssl || true
RUN mkdir -p /app/uploads && chown node:node /app/uploads
WORKDIR /app
COPY --chown=node:node --from=builder /app/package*.json ./