Docker Assignment – Pankaj Devrani

  • Components of Docker and its Brief Summary
    • Docker has below components.
      •  dockerd – is a docker daemon which listens for docker API requests using three different types of sockets(unix, tcp and fd)
      •  Containerd – is responsible for managing container lifecycle. It takes care of image push/pull, managing storage, invoking execution of containers, managing network primitives
      • RunC – is command-line client for running applications packed according to OCI format and is a compliant implementation of the OCI
  • What is the differenece between docker pause and unpause?
    •  pause – suspends al processes in the specified containers.
    •  unpause- un-suspends all the processes in the specified containers.
  • What is the differenet between docker stop and kill?
    • docker stop command the container will stop gracefully using SIGTERM and SIGKILL where as docker kill command terminates the entrypoint process abruptly using SIGKILL signal(which can incurr of data or damage to file system)
  • What is the difference between docker exec and attach?
    • docker attach – is used to attach your terminal inside running container.
    • docker exec – is used to run a new command in the running container
  • List of dockerfile instructions and its Brief Summary?
    • FROM – pulls base images from the registry
    • ADD  – copies image from host to container
    • ENV – Sets an environment variable in the new container
    • RUN – executes commands in a new layer on top of the current image and commit the results and committed image will be used for next step in the Dockerfile. RUN [“executable”, “param1”, “param2”] (exec form) or RUN <command> (shell form)
    • COPY – copies new files or directories from <src> and adds them to the filesystem of the container at the path <dest>.
    • EXPOSE – exposes the port of the container to the host using tcp(default) or udp
    • ENRTYPOINT allows you to configure a container that will run as an executable
    • CMD – to pass on defaults for a container. The parameters for entry point can be passed using CMD.
    • VOLUME – Creates a shared volume that can be shared among containers opr by the host machine
  • 6. What is the differenet between CMD vs Entrypoint
    • ENRTYPOINT – It starts the process you want to run after staring the container
    • CMD – is used to either pass on defaults for a container or . The parameters for entry point can be passed using CMD.
Subscribe
Notify of
guest

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

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