Skip to content

Commit dd54589

Browse files
committed
Adding the actual command to build the image and adding a tag, so the output of docker images is the same as the one in the lab
1 parent c9fa423 commit dd54589

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

developer-tools/java/chapters/ch03-build-image.adoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ CMD ["/bin/echo", "hello world"]
4141

4242
This image uses `ubuntu` as the base image. `CMD` command defines the command that needs to run. It provides a different entry point of `/bin/echo` and gives the argument "`hello world`".
4343

44-
Build the image:
44+
Build the image using the command:
45+
46+
docker image build . -t helloworld
47+
48+
`.` in this command is the context for `docker image build`. `-t` adds a tag to the image.
4549

4650
[source, text]
4751
----
@@ -63,8 +67,6 @@ Removing intermediate container 7615d69d04ec
6367
Successfully built 61edf15e4cec
6468
----
6569

66-
`.` in this command is the context for `docker build`.
67-
6870
List the images available using `docker image ls`:
6971

7072
[source, text]

0 commit comments

Comments
 (0)