2017-07-20 23:09:12 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ -z "$1" ]; then
|
|
|
|
>&2 echo "First argument must be image tag."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2019-04-10 21:05:02 +02:00
|
|
|
TAG="$1"
|
|
|
|
IMAGE="docker/compose-tests"
|
2017-07-20 23:09:12 +02:00
|
|
|
|
2019-04-12 18:46:06 +02:00
|
|
|
DOCKER_COMPOSE_GITSHA="$(script/build/write-git-sha)"
|
2019-04-10 21:05:02 +02:00
|
|
|
docker build -t "${IMAGE}:${TAG}" . \
|
|
|
|
--target build \
|
2019-04-12 18:46:06 +02:00
|
|
|
--build-arg BUILD_PLATFORM="debian" \
|
|
|
|
--build-arg GIT_COMMIT="${DOCKER_COMPOSE_GITSHA}"
|
|
|
|
docker tag "${IMAGE}":"${TAG}" "${IMAGE}":latest
|