File tree Expand file tree Collapse file tree 3 files changed +97
-26
lines changed
Expand file tree Collapse file tree 3 files changed +97
-26
lines changed Original file line number Diff line number Diff line change @@ -9,19 +9,19 @@ mkdir -p "$INSTALL_DIR"
99
1010cat > " $WRAPPER " << 'EOF '
1111#!/bin/sh
12+ set -euo pipefail
1213
13- if [ -f .env ]; then
14- docker run --rm -it \
15- --env-file .env \
16- -v "${PWD}/migrations:/repo:rw" \
17- -v "${PWD}/scripts:/scripts:ro" \
18- ghcr.io/explodinglabs/iko:0.1.0 "$@"
19- else
20- docker run --rm -it \
21- -v "${PWD}/migrations:/repo:rw" \
22- -v "${PWD}/scripts:/scripts:ro" \
23- ghcr.io/explodinglabs/iko:0.1.0 "$@"
24- fi
14+ [ -f .env ] && source .env
15+
16+ ENV_ARG=""
17+ [ -f .env ] && ENV_ARG="--env-file .env"
18+
19+ docker run --rm -it \
20+ $ENV_ARG \
21+ --network "${DOCKER_NETWORK:-bridge}" \
22+ -v "${PWD}/migrations:/repo:rw" \
23+ -v "${PWD}/scripts:/scripts:ro" \
24+ ghcr.io/explodinglabs/iko:0.1.0 "$@"
2525EOF
2626
2727chmod +x " $WRAPPER "
You can’t perform that action at this time.
0 commit comments