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.
So far, we have focused primarily on getting our container images ready for deploying to production, and haven't focused on the developer experience.
Easy/simple to set up: Using docker compose, we can define the entire environment with a single yaml file. To get started, team members can issue a single command
make compose-up-build or
make compose-up-build-debug depending if they want to run the debugger or not.
Ability to iterate without rebuilding the container image: In order to avoid having to rebuild the container image with every single change, we can use a bind mount to mount the code from our host into the container filesystem. For example:
- type: bind
Automatic reloading of the application:
Dockerfile.dev which watches for changes and rebuild the app automatically.
Use a debugger:
react-query-devtools to help debug
react query specific things. It is also viewed from within the browser.
--inspect flag. The debug session can then be accessed via
a websocket on port
9229. The additional considerations in this case are to
specify that the debugger listen for requests from 0.0.0.0 (any) and to publish
9229 from the container to localhost.
We then override the command used to run the container to use this tool (see:
Executing tests: We also need the ability to execute our test suites within containers. Again, we can create a custom
docker-compose-test.yml overlay which modifies the container commands to execute our tests. To build the api images and execute their tests, you can execute
make run-tests which will use the
test compose file along with the
dev compose file to do so.
Continuous integration pipeline for production images
Ephemeral environment for each pull request
In the following lessons we will address all of these!