Merge pull request #165 from jgarrouste/avril-2018

Update output of 'docker build'
This commit is contained in:
Jérôme Petazzoni
2018-04-05 14:57:05 -07:00
committed by GitHub

View File

@@ -93,20 +93,22 @@ The output of `docker build` looks like this:
.small[
```bash
$ docker build -t figlet .
Sending build context to Docker daemon 2.048 kB
Sending build context to Docker daemon
Step 0 : FROM ubuntu
---> e54ca5efa2e9
Step 1 : RUN apt-get update
---> Running in 840cb3533193
---> 7257c37726a1
Removing intermediate container 840cb3533193
Step 2 : RUN apt-get install figlet
---> Running in 2b44df762a2f
---> f9e8f1642759
Removing intermediate container 2b44df762a2f
Successfully built f9e8f1642759
docker build -t figlet .
Sending build context to Docker daemon 2.048kB
Step 1/3 : FROM ubuntu
---> f975c5035748
Step 2/3 : RUN apt-get update
---> Running in e01b294dbffd
(...output of the RUN command...)
Removing intermediate container e01b294dbffd
---> eb8d9b561b37
Step 3/3 : RUN apt-get install figlet
---> Running in c29230d70f9b
(...output of the RUN command...)
Removing intermediate container c29230d70f9b
---> 0dfd7a253f21
Successfully built 0dfd7a253f21
Successfully tagged figlet:latest
```
]
@@ -134,20 +136,20 @@ Sending build context to Docker daemon 2.048 kB
## Executing each step
```bash
Step 1 : RUN apt-get update
---> Running in 840cb3533193
Step 2/3 : RUN apt-get update
---> Running in e01b294dbffd
(...output of the RUN command...)
---> 7257c37726a1
Removing intermediate container 840cb3533193
Removing intermediate container e01b294dbffd
---> eb8d9b561b37
```
* A container (`840cb3533193`) is created from the base image.
* The `RUN` command is executed in this container.
* The container is committed into an image (`7257c37726a1`).
* A container (`e01b294dbffd`) is created from the base image.
* The build container (`840cb3533193`) is removed.
* The build container (`e01b294dbffd`) is removed.
* The container is committed into an image (`eb8d9b561b37`).
* The output of this step will be the base image for the next one.