Skip to main content
FREE Mock interview & resume review with Sumit. Free right now, no payment needed.Book a slot

Docker and Containerization

Learn containerization with Docker.

jiocoder TeamUpdated Jun 6, 20261 min readDocker
Docker and Containerization

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

Article discussion

(0)

Join the discussion — login to comment and help other developers.

Login to comment