Commit 192d0756 authored by Manuel Moos's avatar Manuel Moos
Browse files

Make build_image handle foreign base images

parent 39d64926
Pipeline #236590416 passed with stages
in 38 minutes and 45 seconds
......@@ -8,14 +8,18 @@ set -x
sd=`dirname "$0"`
id="${sd}/../images"
${sd}/ensure_image.sh "$1" -d || exit $?
. ${id}/digest.sh "$1" || exit $?
. ${id}/epoch.sh
touch ${id}/$2.digest.local || exit $?
BASE=$1
echo ${BASE} | grep ':' > /dev/null || BASE=${REGISTRY}$1${REFERENCE}
if ! echo ${BASE} | grep ':' > /dev/null; then
${sd}/ensure_image.sh "$1" -d || exit $?
. ${id}/digest.sh "$1" || exit $?
BASE=${REGISTRY}$1${REFERENCE}
fi
IMAGE=$2
......@@ -35,7 +39,7 @@ echo $$ > ${lock}
result=0
if echo FROM ${BASE} AS base > Dockerfile; then
if cat Dockerfile.proto >> Dockerfile; then
if docker image build . -t "${REGISTRY}${IMAGE}:${EPOCH}" $*; then
if docker image build . -t "${REGISTRY}${IMAGE}:${EPOCH}" "$@"; then
echo "Done!"
else
result=$?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment