Creating the "docker save" tarball for "scratch" is pretty simple. I've also extrapolated the "docker build -t busybox ." logic into a separate "hack/make/.ensure-busybox" file so that it can eventually be reused easier. Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon) Upstream-commit: c8381d672226dd17f2e17f9cf9378f06d533911c Component: engine
11 lines
247 B
Bash
11 lines
247 B
Bash
#!/bin/bash
|
|
|
|
if ! docker inspect busybox &> /dev/null; then
|
|
if [ -d /docker-busybox ]; then
|
|
source "$(dirname "$BASH_SOURCE")/.ensure-scratch"
|
|
( set -x; docker build -t busybox /docker-busybox )
|
|
else
|
|
( set -x; docker pull busybox )
|
|
fi
|
|
fi
|