Introduction to the course
Examine the evolution of virtualization technologies from bare metal, virtual machines, and containers and the tradeoffs between them.
Explores the three core Linux features that enable containers to function (cgroups, namespaces, and union filesystems), as well as the architecture of the Docker components.
Install and configure Docker Desktop
Use publicly available container images in your developer workflows and learn how about container data persistence.
Building out a realistic microservice application to containerize.
Write and optimize Dockerfiles and build container images for the components of the example web app.
Use container registries such as Dockerhub to share and distribute container images.
Use Docker and Docker Compose to run the containerized application from Module 5.
Learn best practices for container image and container runtime security.
Explore how to use Docker to interact with containers, container images, volumes, and networks.
Add tooling and configuration to enable improved developer experience when working with containers.
Deploy containerized applications to production using a variety of approaches.
Final words about the course.
Throughout the course we have interacted with many different Docker objects. This module covers the additional options for how we can work with them.
docker container --help to see all the subcommands associated with Docker containers.
Attach local shell to a container's input, output, and error streams:
docker container attach container-id # equivalent docker attach container-id
Run a new command within a container:
docker container exec container-id command # equivalent docker exec container-id command
Show detailed information about a container:
docker container inspect container-id
Stop a container gracefully or forcefully:
docker container stop container-id # equivalent docker container stop container-id docker container kill container-id # equivalent docker kill container-id
View the logs of a container:
docker container logs container-id # Add -f to tail the logs docker container logs -f container-id # equivalent docker logs -f container-id
List all running containers:
docker container ls # Add -a to list stopped containers as well docker container ls -a # equivalent docker ps -a
Remove all stopped containers:
docker container prune
Remove a specific container:
docker container rm container-id
Create a container from an image:
docker container run -it image-name:tag # equivalent docker run -it image-name:tag
See what's running inside a container:
docker container top container-id
Wait for a container to finish before proceeding:
docker container wait container-id
This can be useful if you are scripting something that should only happen after a container exits.