Docker Flashcards
What is Docker?
https://docs.docker.com/get-started/overview/
What are Docker’s most notable features?
https://www.geeksforgeeks.org/features-of-docker/
Why should anyone use Docker? What does it offer?
https://sematext.com/glossary/docker/#:~:text=Simply%20put%2C%20Docker%20allows%20you,standardized%20way%20to%20deploy%20them.
Why should anyone use Docker? What does it offer?
https://sematext.com/glossary/docker/#:~:text=Simply%20put%2C%20Docker%20allows%20you,standardized%20way%20to%20deploy%20them.
Does Docker have any downsides?
https://www.linkedin.com/pulse/docker-an-overviewpros-cons-danish-jamil?utm_source=share&utm_medium=member_ios&utm_campaign=share_via
Name and explain the various Docker components.
https://www.spiceworks.com/tech/big-data/articles/what-is-docker/amp/
Question 5
https://www.simplilearn.com/tutorials/docker-tutorial/docker-interview-questions
What is a container?
Containers are deployed applications bundled with all necessary dependencies and configuration files. All of the elements share the same OS kernel. Since the container isn’t tied to any one IT infrastructure, it can run on a different system or the cloud.
https://www.interviewbit.com/docker-interview-questions/
Explain virtualization.
https://aws.amazon.com/what-is/virtualization/#:~:text=Virtualization%20is%20technology%20that%20you,on%20a%20single%20physical%20machine.
What’s the difference between virtualization and containerization?
https://www.liquidweb.com/kb/virtualization-vs-containerization/#:~:text=Virtualization%20relies%20on%20hypervisors%20and,agility%2C%20portability%2C%20and%20scalability.
Describe a Docker container’s lifecycle.
https://www.linkedin.com/pulse/understanding-docker-container-lifecycle-depth-rohit-kumar-shaw?utm_source=share&utm_medium=member_ios&utm_campaign=share_via
Name the essential Docker commands and what they do.
Build. Builds a Docker image file
Commit. Creates a new image from container changes
Create. Creates a new container
Dockerd. Launches Docker daemon
Kill. Kills a container
What are Docker object labels?
https://docs.docker.com/config/labels-custom-metadata/#:~:text=Labels%20are%20a%20mechanism%20for,Local%20daemons
How do you find stored Docker volumes?
https://spacelift.io/blog/docker-volumes#:~:text=All%20volumes%20are%20managed%20by,filesystem%20paths%20in%20your%20containers.
How do you check the versions of Docker Client and Server?
https://docs.docker.com/engine/reference/commandline/version/#:~:text=The%20version%20command%20(%20docker%20version,Docker%20CLI%20you%20are%20using.
The command used to get all version information of the client and server is the docker version.
To get only the server version details, we can run docker version –format ‘{{.Server.Version}}’
Show how you would create a container from an image.
https://www.geeksforgeeks.org/how-to-create-a-docker-container-from-an-existing-image/
To create a Docker container from an image, you use the docker run command followed by the image name. For example, docker run myimage:tag will create and start a new container based on the specified image. Additional options can be provided to configure container settings such as networking, volume mounts, environment variables, and more.
Show how you would create a container from an image.
https://www.geeksforgeeks.org/how-to-create-a-docker-container-from-an-existing-image/
command to stop the container?
Use the following command: $ sudo docker stop container name
How would you list all of the containers currently running?
Use the command: $ docker ps
What’s involved in scaling a Docker container?
https://docs.docker.com/engine/reference/commandline/service_scale/
What do you know about the Docker system prune?
https://docs.docker.com/engine/reference/commandline/system_prune/
The docker system prune command is used to clean up unused Docker resources including stopped containers, unused networks, dangling images, and unused volumes. It helps reclaim disk space and improve system performance by removing resources that are no longer needed.
Note: The docker system prune command should be used with caution as it permanently deletes unused resources. Any data associated with them will be lost.
List some of the more advanced Docker commands and what they do.
Some advanced commands include:
Docker info. Displays system-wide information regarding the Docker installation
Docker pull. Downloads an image
Docker stats. Provides you with container information
Docker images. Lists downloaded images
List some of the more advanced Docker commands and what they do.
Some advanced commands include:
Docker info. Displays system-wide information regarding the Docker installation
Docker pull. Downloads an image
Docker stats. Provides you with container information
Docker images. Lists downloaded images
Can you lose data stored in a container?
Any data stored in a container remains there unless you delete the containe
Which is the best method for removing a container: the command “stop container” followed by the command “remove the container,” the rm command by itself?
Stop the container first, then remove it. Here’s how:
$ docker stop <coontainer_id>
$ docker rm -f <container_id></container_id></coontainer_id>