Explanation
Containers package apps with dependencies so they run the same way locally and in production.
Code example
dockerfileFROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
EXPOSE 3000
CMD ["npm", "run", "start"]Helpful resources
Exercise
Dockerize your API or Next.js app and run it with docker compose including PostgreSQL.
