Docker and its brief

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Components of Docker and its Brief Summary:

Docker Components :

Docker Engine: Core part of the docker system. It consists following 3 components:

  1. Server: It is the docker daemon calledĀ dockerd. It can create and manage docker images. Containers, networks, etc.
  2. Rest API: It is used to instruct docker daemon what to do.
  3. Command Line Interface (CLI): It is a client which is used to enterĀ docker commands

Docker Client:

Docker users can interact with Docker through a client. When any docker commands runs, the client sends them to dockerd daemon, which carries them out.Ā 

Docker Registries:

It is the location where docker images are stored

Docker Objects

When you are working with Docker, you use images, containers, volumes, networks; all these are Docker objects.

Difference between docker pause and unpause?

docker pause: Pause running process inside docker container.

docker unpause: Resume the paused process inside docker container

Difference between docker stop and kill?

docker stop : Stop the container

docker kill: Terminate the entrypoint process

What is the differenet between docker exec and attach?

docker exec: Run new process already started container

docker attach: Ā To attach your terminalā€™s standard input, output, and error (or any combination of the three) to a running container using the containerā€™s ID or name. This allows you to view its ongoing output or to control it interactively, as though the commands were running directly in your terminal.

Ā List of dockerfile instructions and its Brief Summary?

FROM: Docker Image will be downloaded from docker hub registry if it is not exists locally

LABEL
LABEL instruction is used to specify metadata informations to an image. A LABEL is a key-valueĀ  pair.

EXPOSE
EXPOSE instruction is used to inform about the network ports that the container listens on runtime

ADD

Add the files to the images(ADD supports remote urls(not encourged to use) and automaticalls unzips tar balls

COPY:

copy the files to image

RUN
RUN instruction is used to executes any commands on top of the current image and this will create a new layer.

CMD

CMD instruction is used to set a command to be executed when running a container. There must be only one CMD in a Dockerfile. If more than one CMD is listed, only the last CMD takes effect.

ENTRYPOINT
ENTRYPOINT instruction is used to configure and run a container as an executable. It will be main process inside the container. So it will run after starting the container

Ā What is the differenet between CMD vs Entrypoint?

CMD commands are ignored by Daemon when there are parameters stated within the docker run command.
ENTRYPOINT instructions are not ignored but instead are appended as command line parameters by treating those as arguments of the command.

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x