03 Build Container
From folder 3.Docker
- Open a terminal in
3.Docker
directory (Hint: Right click the folder, and selectOpen in integrated terminal
) - To build dthe container run (Note the . in the end)
docker build -t web:v1 .
This triggers a build of a image, with the name
web1
and with a version tab ofv1
Watch the build as it runs, thru every line of the
Dockerfile
When it’s done, you should read
Successfully tagged web:v1
To see the images local on the machine run
docker image ls
Note you will see both the Web container, and the nginx container, that the web container was build on. As part of this workshop, there will also be a couple of other images, that all start with registry.tanzu.dk, but that is for a later step.
Note you have not created a container, but only a image, from where you can build containers.