summaryrefslogtreecommitdiffstats
path: root/redhat/docker/build.sh
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2021-01-30 14:34:02 +0100
committerFrançois Andriot <albator78@libertysurf.fr>2021-01-30 22:29:41 +0100
commit6581dc50b83f203d65eac61c00a159ab2a6ddb5d (patch)
tree85c02d38ca9dcedc28798ee41c4b16ec7260e9bc /redhat/docker/build.sh
parent87e57a1a070839a44db16a0410ef57902db2df3e (diff)
downloadtde-packaging-6581dc50b83f203d65eac61c00a159ab2a6ddb5d.tar.gz
tde-packaging-6581dc50b83f203d65eac61c00a159ab2a6ddb5d.zip
RPM: massive update and cleanup
Diffstat (limited to 'redhat/docker/build.sh')
-rwxr-xr-xredhat/docker/build.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/redhat/docker/build.sh b/redhat/docker/build.sh
index 88adfbe38..21f1385e5 100755
--- a/redhat/docker/build.sh
+++ b/redhat/docker/build.sh
@@ -1,23 +1,24 @@
-#!/bin/bash -ex
+#!/bin/bash -e
DISTRIB="$1"
TDE_VERSION="$2"
ARCH="$3"
-[ -z "${TDE_VERSION}" ] && TDE_VERSION="14.0.5"
+[ -z "${TDE_VERSION}" ] && TDE_VERSION="14.0.7"
[ -z "${ARCH}" ] && ARCH="x86_64"
+[ -x /usr/bin/podman ] && DOCKER=podman || DOCKER=docker
IMAGE="trinity.${DISTRIB}.${ARCH}:${TDE_VERSION}"
FILE="${HOME}/tde/docker/${IMAGE}.tar.gz"
-if [ $(docker images -q "${IMAGE}") ]; then
+if [ $(${DOCKER} images -q "${IMAGE}") ]; then
echo "Docker image '${IMAGE}' already exists."
elif [ -r "${FILE}" ]; then
- echo "Importing existing docker image '${FILE}'."
- zcat "${FILE}" | docker import - "${IMAGE}"
+ echo "Importing existing image '${FILE}'."
+ zcat "${FILE}" | ${DOCKER} image load
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}"
+ ${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 save "${IMAGE}" | pigz >"${FILE}"
+ ${DOCKER} image save "${IMAGE}" | pigz >"${FILE}"
fi