compose/script/build/test-image
Ulysses Souza c217bab7f6 Refactor Dockerfiles for generating musl binaries
- Refactor Dockerfile to be used for tests and distribution on docker hub on debian and alpine
to use for final usage and also tests
- Adapt test scripts to the new Dockerfiles' structure
- Adapt Jenkinsfile to add alpine to the test matrix

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-04-17 16:08:33 +02:00

19 lines
400 B
Bash
Executable File

#!/bin/bash
set -e
if [ -z "$1" ]; then
>&2 echo "First argument must be image tag."
exit 1
fi
TAG="$1"
IMAGE="docker/compose-tests"
DOCKER_COMPOSE_GITSHA=$(script/build/write-git-sha)
docker build -t "${IMAGE}:${TAG}" . \
--target build \
--build-arg BUILD_PLATFORM=debian \
--build-arg GIT_COMMIT=${DOCKER_COMPOSE_GITSHA}
docker tag ${IMAGE}:${TAG} ${IMAGE}:latest