Docker: Dockerfile for a Node app
A short, tested Docker example for dockerfile for a node app. Copy it and adjust the names and paths for your project.
Docker
FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]Find it in Zest
Search for “docker dockerfile for a node app” in Zest and this example appears above the results, with other matches to choose from. Searches stay private.