Uploaded by Khushali Patel

What is Docker

advertisement
Docker
Monday, June 28, 2021
12:58 PM
What are Containers?
•
•
•
•
•
•
•
Containers isolate applications' execution environments from one another
They share the underlying OS kernel
Typically measured in megabytes
Uses far less resources than VMs (another solution for isolating application clusters)
They can be packed more densely on the same hardware and can be spun up and down with low
effort and overhead
Designed to be transient and temporary
Can be stopped and restarted which launches the container into the same state as when it was
stopped
What is Docker?
•
Open source project that makes it easy to create containers and container-based apps
Dockerfile
•
•
•
•
Each Docker container starts with a Dockerfile
It is a text file that includes instructions to build a Docker image
Specifies the operating system that will underlie the container, languages, environment
variables, file locations, network ports, other components it needs, and what the container will
be doing once its run
Tells "build" how to make the image
Docker Image
•
•
•
Once the Dockerfile is written, need to invoke the Docker "build utility" to create an image
based on that Dockerfile
Image is a portable file containing the specs for which software components the container will
run and how
Image is static
Docker Run
•
•
•
"Run" command launches a container
Each container is an instance of an image
Multiple container instances of the same image can be run at the same time
o As long as each container has a unique name
Download