Dokploy wraps scheduled-task commands in `bash -c "..."` and the daily reconcile cron uses curl. node:20-alpine ships neither — first manual "Run now" failed with `exec: "bash": executable file not found in $PATH`. apk add --no-cache bash curl adds ~5MB to the runtime image; trivial cost for the cron use case.
19 lines
537 B
Docker
19 lines
537 B
Docker
# Build stage
|
|
FROM node:20-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci --ignore-scripts && npx nuxt prepare
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# Production stage — only the self-contained .output is needed.
|
|
# bash + curl are added so Dokploy scheduled tasks (which wrap commands in
|
|
# `bash -c "..."`) can run; alpine ships only ash and has no curl by default.
|
|
FROM node:20-alpine
|
|
RUN apk add --no-cache bash curl
|
|
WORKDIR /app
|
|
COPY --from=builder /app/.output .output
|
|
|
|
EXPOSE 3000
|
|
CMD ["node", ".output/server/index.mjs"]
|