diff options
| author | mo khan <mo.khan@gmail.com> | 2020-06-10 20:43:08 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-06-10 20:43:08 -0600 |
| commit | 6f65e7fa18a406c5b233d7d692186b302d594971 (patch) | |
| tree | 55b09e591e34c2f5c37f45af28332fff25e68339 /examples/001 | |
| parent | c5794d5b829ab12d09b535d8aaf2faad56cc6cf2 (diff) | |
build large image and small image
Diffstat (limited to 'examples/001')
| -rw-r--r-- | examples/001/dive-exec.sh | 6 | ||||
| -rw-r--r-- | examples/001/docker-exec.sh | 6 | ||||
| -rw-r--r-- | examples/001/docker-large-download.sh | 4 |
3 files changed, 16 insertions, 0 deletions
diff --git a/examples/001/dive-exec.sh b/examples/001/dive-exec.sh new file mode 100644 index 0000000..a14c43d --- /dev/null +++ b/examples/001/dive-exec.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +set -e +image_id="$(docker image ls developing-with-docker | awk '{ print $3 }' | grep -v REPO | tail -n1)" +echo "$ dive $image_id" +dive "$image_id" diff --git a/examples/001/docker-exec.sh b/examples/001/docker-exec.sh new file mode 100644 index 0000000..39478b2 --- /dev/null +++ b/examples/001/docker-exec.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +set -e + +image_id="$(docker ps | grep developing | awk '{ print $1 }' | tail -n1)" +docker exec -it "$image_id" /bin/sh diff --git a/examples/001/docker-large-download.sh b/examples/001/docker-large-download.sh new file mode 100644 index 0000000..659004c --- /dev/null +++ b/examples/001/docker-large-download.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +docker rmi -f "$(docker images | grep 'license-management')" 2> /dev/null +docker pull registry.gitlab.com/gitlab-org/security-products/license-management:latest |
