Skip to content

Docker Guide.md

SHADIL AM edited this page May 25, 2025 · 1 revision

Dockerfile

FROM node:18-alpine
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]

.dockerignore

node_modules
.next
.env

Build & Run

docker build -t nextjs-app .
docker run -p 3000:3000 --env-file .env nextjs-app

Clone this wiki locally