0% found this document useful (0 votes)
91 views1 page

REVISION Docker

Docker is an open-source containerization platform that allows users to develop, deploy, and manage applications using lightweight virtual containers that contain all the elements required to run the application. Docker uses images to create containers that are isolated environments running on host machines and Docker commands like docker run and docker ps can be used to manage containers and images. Dockerfiles contain instructions to automate the creation of images for containers using directives like FROM, CMD, ENV, and EXPOSE.

Uploaded by

shanthi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views1 page

REVISION Docker

Docker is an open-source containerization platform that allows users to develop, deploy, and manage applications using lightweight virtual containers that contain all the elements required to run the application. Docker uses images to create containers that are isolated environments running on host machines and Docker commands like docker run and docker ps can be used to manage containers and images. Dockerfiles contain instructions to automate the creation of images for containers using directives like FROM, CMD, ENV, and EXPOSE.

Uploaded by

shanthi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

DOCKER

Docker is an open-source containerization platform used for


DOCKER developing, deploying, and managing applications in lightweight
virtualized environments called containers.
Image Bare OS
1. It contains application & each container is independent.
Containers created based on images in instances.
Container 2. each container get 65535 ip addresses
3.Containers cannot be accessed from laptop. It should be through
instances and before the instance need to mapped to container

docker images - display list of images


docker ps - list of running containers
docker ps -a - list of all containers
docker rm contid /cont name - delete container
Some Docker commands docker rmi <image name> - delete image
docker run images. - create container
docker run - d - detach mode
docker inspect cont.id - to check ip address of container
specifies the instruction that is to be executed when a Docker
CMD
container starts [instruction overwrite at container creation]
allows us to make a container runnable, however, we can still
entrypoint specify the command while starting the container. [instruction
append at container creation]
FROM CMD LABEL
WORKDIR ENTRYPOINT STOPSIGNAL
Docker file contains setup instructions: ENV EXPOSE
ARG COPY
RUN ADD
to build a custom images. Above setup instructions used to create
docker build image. At the time of container creation, CMD & entrypoint
instructions will be executed.
Environment variable Once container created this varaible are accessable
Argument variable not accesable once container created
Docker volumes are file systems mounted on Docker containers to
DOCKER volume
preserve data generated by the running container

Bind mount A file or directory on the host machine is mounted in to a container


let you write Dockerfiles with multiple FROM statements.
The multi-stage builds make a difference only when there are
multistage docker build many containers like in CI/CD.
used to push or share a local Docker image or a repository to a
Docker push central repository

You might also like