base is now wolfios
Some checks failed
Build and Deploy Container / build_and_deploy (push) Failing after 23s

This commit is contained in:
Clemens Hering
2025-11-11 06:27:09 +01:00
parent ef15dc1dfe
commit d0292ac192

View File

@@ -1,26 +1,34 @@
# Multi-stage build for Astro static site ###########
FROM node:22-alpine AS builder # BUILD STAGE
###########
FROM cgr.dev/chainguard/node:latest-dev AS build
WORKDIR /app WORKDIR /app
# Install deps # Copy dependency manifests
COPY package*.json ./ COPY package*.json ./
RUN npm ci || npm install
# Copy sources and build static output # Install all deps (inkl. dev)
RUN --mount=type=cache,target=/root/.npm npm ci
# Copy app source and build
COPY . . COPY . .
RUN npm run build RUN npm run build
# ---- Runtime stage ---- ###########
FROM node:22-alpine AS runtime # RUNTIME STAGE
WORKDIR /app ###########
FROM cgr.dev/chainguard/node:latest
ENV NODE_ENV=production ENV NODE_ENV=production
ENV PORT=3000 WORKDIR /app
ENV WEB_ROOT=/app/dist
ENV TZ=Europe/Berlin # Copy only whats needed to run
ENV ASTRO_TELEMETRY_DISABLED=1 COPY --from=build /app/package*.json ./
COPY --from=builder /app/dist /app/dist COPY --from=build /app/node_modules ./node_modules
COPY server.mjs /app/server.mjs COPY --from=build /app/dist ./dist
# Drop root: use the pre-created node user COPY --from=build /app/server.mjs ./server.mjs
USER node
# Chainguard runs as nonroot by default (user `nonroot`)
USER nonroot
#EXPOSE 3000 #EXPOSE 3000
CMD ["node", "/app/server.mjs"]
CMD ["node", "./server.mjs"]