summaryrefslogtreecommitdiffstats
path: root/redhat/docker/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/docker/build.sh')
-rwxr-xr-xredhat/docker/build.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/redhat/docker/build.sh b/redhat/docker/build.sh
index a53ffd06a..da21a69f5 100755
--- a/redhat/docker/build.sh
+++ b/redhat/docker/build.sh
@@ -7,6 +7,7 @@ ARCH="$3"
[ -z "${TDE_VERSION}" ] && TDE_VERSION="14.1.2"
[ -z "${ARCH}" ] && ARCH="x86_64"
[ -x /usr/bin/podman ] && DOCKER=podman || DOCKER=docker
+[ -x /usr/bin/pigz ] && GZIP=pigz || GZIP=gzip
IMAGE="trinity.${DISTRIB}.${ARCH}:${TDE_VERSION}"
FILE="${HOME}/tde/docker/${IMAGE}.tar.gz"
@@ -20,11 +21,11 @@ else
echo "Building new Docker image '${IMAGE}'."
${DOCKER} build -t "${IMAGE}" -f "${DISTRIB}/Dockerfile.${ARCH}" --build-arg TDE_VERSION="${TDE_VERSION}" --build-arg ARCH="${ARCH}" "${DISTRIB}"
echo "Saving image to '${FILE}'"
- ${DOCKER} image save "${IMAGE}" | pigz >"${FILE}"
+ ${DOCKER} image save "${IMAGE}" | ${GZIP} >"${FILE}"
fi
# Strip 'localhost/' prefix from image tag
-if ! docker images | while read name tag blah; do echo "${name}:${tag}"; done | grep -q "^${IMAGE}$"; then
- docker image tag "localhost/${IMAGE}" "${IMAGE}"
- #docker image remove "localhost/${IMAGE}"
+if ! ${DOCKER} images | while read name tag blah; do echo "${name}:${tag}"; done | grep -q "^${IMAGE}$"; then
+ ${DOCKER} image tag "localhost/${IMAGE}" "${IMAGE}"
+ #${DOCKER} image remove "localhost/${IMAGE}"
fi