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
506 B
Bash
Executable File

#!/bin/bash
set -ex
./script/clean
TMP_CONTAINER="tmpcontainer"
TAG="docker/compose:tmp-glibc-linux-binary"
DOCKER_COMPOSE_GITSHA=$(script/build/write-git-sha)
docker build -t "${TAG}" . \
--build-arg BUILD_PLATFORM=debian \
--build-arg GIT_COMMIT=${DOCKER_COMPOSE_GITSHA}
docker create --name ${TMP_CONTAINER} ${TAG}
mkdir -p dist
docker cp ${TMP_CONTAINER}:/usr/local/bin/docker-compose dist/docker-compose-Linux-x86_64
docker container rm -f ${TMP_CONTAINER}
docker image rm -f ${TAG}