Skip to content

Commit ce40f01

Browse files
committed
Rebuild docs
1 parent c75b7c2 commit ce40f01

File tree

3 files changed

+97
-26
lines changed

3 files changed

+97
-26
lines changed

iko/install.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ mkdir -p "$INSTALL_DIR"
99

1010
cat > "$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 "$@"
2525
EOF
2626

2727
chmod +x "$WRAPPER"

0 commit comments

Comments
 (0)