In this chapter, we learned how to use Docker commands to create and operate containers. We learned most of the commonly used Docker commands, such as build, run, exec, ps, images, tag, and push.
We saw how to build a web service container, including the preparation of configuration files, how to structure a Dockerfile, and how to make our images as small as possible. We also covered how to use docker-compose to operate locally and, through a docker-compose.yaml file, connect different containers running in a cluster configuration. This included creating a database container that allows testing much closer to what the production deployment will be, using the same tools.
We saw how to use environment variables to configure our service and how to inject them through docker-compose configuration to allow different modes, such as testing.
Finally, we analyzed how to use a...