mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
- 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>
21 lines
546 B
Bash
Executable File
21 lines
546 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
# first arg is `-f` or `--some-option`
|
|
if [ "${1#-}" != "$1" ]; then
|
|
set -- docker-compose "$@"
|
|
fi
|
|
|
|
# if our command is a valid Docker subcommand, let's invoke it through Docker instead
|
|
# (this allows for "docker run docker ps", etc)
|
|
if docker-compose help "$1" > /dev/null 2>&1; then
|
|
set -- docker-compose "$@"
|
|
fi
|
|
|
|
# if we have "--link some-docker:docker" and not DOCKER_HOST, let's set DOCKER_HOST automatically
|
|
if [ -z "$DOCKER_HOST" -a "$DOCKER_PORT_2375_TCP" ]; then
|
|
export DOCKER_HOST='tcp://docker:2375'
|
|
fi
|
|
|
|
exec "$@"
|