Files
backstage/packages/backend/Dockerfile
RBER Admin e84dd40717
All checks were successful
continuous-integration/drone/push Build is passing
Fix Dockerfile for yarn 4
2025-12-08 20:02:55 +00:00

25 lines
729 B
Docker

FROM node:18-bookworm-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends python3 g++ build-essential && \
rm -rf /var/lib/apt/lists/* && \
corepack enable
USER node
WORKDIR /app
ENV NODE_ENV=production
COPY --chown=node:node yarn.lock package.json .yarnrc.yml ./
COPY --chown=node:node .yarn .yarn
COPY --chown=node:node packages/backend/dist/skeleton.tar.gz ./
RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz
RUN yarn workspaces focus --all --production
COPY --chown=node:node packages/backend/dist/bundle.tar.gz app-config*.yaml ./
RUN tar xzf bundle.tar.gz && rm bundle.tar.gz
CMD ["node", "packages/backend", "--config", "app-config.yaml", "--config", "app-config.production.yaml"]