July 2017
Beginner to intermediate
358 pages
10h 54m
English
To build an image from our Dockerfile, we can execute a straightforward command:
$ docker build -t testserver .
Breaking this down the -t argument is the tag we wish to give the container, this takes the form name:tag, If we omit the tag portion of the argument as we have in our example command, then the tag latest will be automatically assigned.
If you run docker images, you will see that our testserver image has been given this tag.
The final argument is the context we would like to send to the Docker Engine. When you run a Docker build, the context is automatically forwarded to the server. This may seem strange, but you have to remember that it is not uncommon that the Docker Engine will not be running ...
Read now
Unlock full access