Language
Back

Developer Tools

Dockerfile Generator

Generate a production-ready Dockerfile template.

Input

Dockerfile Generator

dockerfiledockernodedeployment
Output

Generated Dockerfile

# tool-planet
FROM node:20-alpine AS deps
WORKDIR /app
COPY package*.json* yarn.lock* pnpm-lock.yaml* ./
RUN npm ci

FROM node:20-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build

FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app ./
EXPOSE 3000
CMD ["npm","start"]

Related tools

Cookie preferences

We use cookies for essential site features and, with your permission, analytics and advertising.