Update "hello-world" docs to be multiarch-aware
This commit is contained in:
parent
4c1d14a1ee
commit
7c45aad1e8
|
|
@ -1,7 +1,10 @@
|
|||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
set -Eeuo pipefail
|
||||
|
||||
image="${1:-hello-world}"
|
||||
|
||||
docker pull hello-world &> /dev/null
|
||||
docker pull "$image" &> /dev/null
|
||||
|
||||
exec > "$(dirname "$(readlink -f "$BASH_SOURCE")")/content.md"
|
||||
|
||||
|
|
@ -9,11 +12,11 @@ echo '# Example output'
|
|||
echo
|
||||
|
||||
echo '```console'
|
||||
echo '$ docker run hello-world'
|
||||
echo '$ docker run' "$image"
|
||||
docker run --rm hello-world
|
||||
echo
|
||||
echo '$ docker images hello-world'
|
||||
docker images hello-world | awk -F' +' 'NR == 1 || $2 == "latest" { print $1"\t"$2"\t"$3"\t"$5 }' | column -t -s$'\t'
|
||||
echo '$ docker images' "$image"
|
||||
docker images "$image" | awk -F' +' 'NR == 1 || $2 == "latest" { print $1"\t"$2"\t"$3"\t"$5 }' | column -t -s$'\t'
|
||||
echo '```'
|
||||
|
||||
echo
|
||||
|
|
|
|||
Loading…
Reference in New Issue