/usr/bin/ch-build2dir is in charliecloud 0.2.3~git20171120.1a5609e-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #!/bin/sh
LIBEXEC=/usr/lib/charliecloud
. ${LIBEXEC}/base.sh
set -e
usage () {
cat 1>&2 <<EOF
Build a Charliecloud image specified by \$PWD/Dockerfile and unpack it.
Equivalent to ch-build, ch-docker2tar, ch-tar2dir sequence but somewhat less
flexible.
Usage:
$ $(basename $0) CONTEXT DEST [ARGS ...]
Arguments:
CONTEXT Docker context directory
DEST Directory in which to place image tarball and directory
ARGS Additional arguments passed to ch-build
You must have sufficient privilege (via sudo) to run the Docker commands.
EOF
exit ${1:-1}
}
if [ "$1" = "--help" ]; then
usage 0
fi
if [ "$1" = "--version" ]; then
version
exit 0
fi
if [ "$#" -lt 2 ]; then
usage
fi
CONTEXT="$1"
DEST="$2"
shift 2
TAG=$(basename $PWD)
set -x
$CH_BIN/ch-build -t $TAG "$CONTEXT" "$@"
$CH_BIN/ch-docker2tar $TAG "$DEST"
$CH_BIN/ch-tar2dir "$DEST/$TAG.tar.gz" "$DEST"
rm "$DEST/$TAG.tar.gz"
|