Browse Source

fix: correctly set compose ``-i`` options only when needed

checking
Valentin Lab 5 years ago
parent
commit
3ff8b02d40
  1. 2
      Dockerfile
  2. 5
      bin/compose

2
Dockerfile

@ -13,7 +13,7 @@ ENV KAL_SHLIB_ARRAY_VERSION="0.2.0" \
KAL_SHLIB_CACHE_VERSION="0.0.1" \ KAL_SHLIB_CACHE_VERSION="0.0.1" \
KAL_SHLIB_CHARM_VERSION="0.4.1" \ KAL_SHLIB_CHARM_VERSION="0.4.1" \
KAL_SHLIB_CMDLINE_VERSION="0.0.5" \ KAL_SHLIB_CMDLINE_VERSION="0.0.5" \
KAL_SHLIB_COMMON_VERSION="0.4.15" \
KAL_SHLIB_COMMON_VERSION="0.4.16" \
KAL_SHLIB_CONFIG_VERSION="0.0.2" \ KAL_SHLIB_CONFIG_VERSION="0.0.2" \
KAL_SHLIB_CORE_VERSION="0.7.0" \ KAL_SHLIB_CORE_VERSION="0.7.0" \
KAL_SHLIB_FIREWALL_VERSION="0.2.0" \ KAL_SHLIB_FIREWALL_VERSION="0.2.0" \

5
bin/compose

@ -199,8 +199,11 @@ run() {
done < <(cat "$COMPOSE_LAUNCHER_OPTS") done < <(cat "$COMPOSE_LAUNCHER_OPTS")
COMPOSE_DOCKER_IMAGE=${COMPOSE_DOCKER_IMAGE:-docker.0k.io/compose} COMPOSE_DOCKER_IMAGE=${COMPOSE_DOCKER_IMAGE:-docker.0k.io/compose}
if [ -t 0 ]; then
docker_run_opts+=("-i")
fi
if [ -t 1 ]; then if [ -t 1 ]; then
docker_run_opts+=("-ti")
docker_run_opts+=("-t")
fi fi
exec docker run --rm "${docker_run_opts[@]}" "${COMPOSE_DOCKER_IMAGE}" "$@" exec docker run --rm "${docker_run_opts[@]}" "${COMPOSE_DOCKER_IMAGE}" "$@"
} }

Loading…
Cancel
Save