In this chapter, we have looked at an in-depth view of the Dockerfile and the best practices to write them, the docker build
command and the various ways we can build the said containers, and the various Docker Hubs to store the containers you have built. We also learned about the environmental variables that you can use to pass from your Dockerfile to the various items inside your containers and Docker volumes to store persistent or shared data.
Let's do a quick review of all the commands we have learned in this chapter.
docker inspect
: To inspect a running containerdocker build
: To build a new image from a Dockerfiledocker login
: To login to the Docker Hubdocker commit
: To commit changes to a running containerdocker search
: To search the Docker Hub from the command linedocker push
: To push a new image or changes to existing changes to the Docker Hubdocker run -e
: To run a new container and specify an environmental variable valuedocker run -v
: To run a Docker container and...