Docker and Containerization
Learn containerization with Docker.

What is Docker?#
Docker is a platform for developing, shipping, and running applications in containers.
Dockerfile#
Code
FROM node:18
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]Commands#
Code
# Build image
docker build -t my-app .
# Run container
docker run -p 3000:3000 my-app
# List containers
docker ps
# Stop container
docker stop container-id