Summary
In this chapter, we introduced Docker volumes, which can be used to persist the state produced by containers and make them durable. We can also use volumes to provide containers with data originating from various sources. We learned how to create, mount, and use volumes. We also learned various techniques for defining volumes such as by name, by mounting a host directory, or by defining volumes in a container image.
In this chapter, we also discussed how we can configure environment variables that can be used by applications running inside a container. We have shown how to define those variables in the docker container run
command, either explicitly, one by one, or as a collection in a configuration file. Finally, we learned how to parameterize the build process of container images by using build arguments.
In the next chapter, we are going to introduce techniques commonly used to allow a developer to evolve, modify, debug, and test their code while running in a container...