aboutsummaryrefslogtreecommitdiff
path: root/examples/example1.sh
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example1.sh')
-rwxr-xr-xexamples/example1.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/example1.sh b/examples/example1.sh
index d441d9a..cc42e7c 100755
--- a/examples/example1.sh
+++ b/examples/example1.sh
@@ -16,6 +16,14 @@
set -exuo pipefail
# Run a container
+# Time the docker command tells us how long it took
+# --rm will remove the container after it's done executing
+# -it is for running the docker process interactively in our
+# current terminal vs running it as a daemon.
+# ubuntu:18.04 is the image we want to use, if we don't have
+# the image downloaded then docker will automatically try
+# to get it from docker hub
+# The remainder is the command we're passing to the container
time docker run --rm -it ubuntu:18.04 /bin/bash -c 'echo Hello World'
# Show size of docker container