|
|
@ -1,4 +1,4 @@
|
|
|
|
#!/bin/bash -ex
|
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
|
|
|
|
DISTRIB="$1"
|
|
|
|
DISTRIB="$1"
|
|
|
|
TDE_VERSION="$2"
|
|
|
|
TDE_VERSION="$2"
|
|
|
@ -14,10 +14,10 @@ if [ $(docker images -q "${IMAGE}") ]; then
|
|
|
|
echo "Docker image '${IMAGE}' already exists."
|
|
|
|
echo "Docker image '${IMAGE}' already exists."
|
|
|
|
elif [ -r "${FILE}" ]; then
|
|
|
|
elif [ -r "${FILE}" ]; then
|
|
|
|
echo "Importing existing docker image '${FILE}'."
|
|
|
|
echo "Importing existing docker image '${FILE}'."
|
|
|
|
zcat "${FILE}" | docker import - "${IMAGE}"
|
|
|
|
zcat "${FILE}" | docker image load
|
|
|
|
else
|
|
|
|
else
|
|
|
|
echo "Building new Docker image '${IMAGE}'."
|
|
|
|
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}'"
|
|
|
|
echo "Saving image to '${FILE}'"
|
|
|
|
docker save "${IMAGE}" | pigz >"${FILE}"
|
|
|
|
docker image save "${IMAGE}" | pigz >"${FILE}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|