Skip to content

Commit

Permalink
chore: fix line ending in pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alastairtree committed Aug 16, 2024
1 parent 4e8d20e commit 1163a78
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions run-docker.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
#!/bin/bash
set -e

# Example:
# ./run-docker.sh
# ./run-docker.sh -i // for interactive debugging
# ./run-docker.sh -i -e VARIABLE=some_value // for interactive debugging with VARIABLE env var set

IMAGE_NAME="${IMAGE_NAME:-imap-pipeline-core/imap-mag}"

echo "Running $IMAGE_NAME with dev.env file"

# check if the argument "DEBUG" or "-i" is passed
if [ "$1" == "debug" ] || [ "$1" == "DEBUG" ] || [ "$1" == "-i" ]; then
echo "Overriding entrypoint to be an interactive bash shell for debugging"
docker run --rm -it \
--entrypoint /bin/bash \
--env-file dev.env \
-v /mnt/imap-data:/data \
$IMAGE_NAME
elif [ -z "$1" ]; then # no args passed
docker run --rm -it \
--env-file dev.env \
-v /mnt/imap-data:/data \
$IMAGE_NAME
else
echo "Extra arguments: $@"
docker run --rm -it \
--env-file dev.env \
-v /mnt/imap-data:/data \
$@ $IMAGE_NAME
fi
#!/bin/bash
set -e

# Example:
# ./run-docker.sh
# ./run-docker.sh -i // for interactive debugging
# ./run-docker.sh -i -e VARIABLE=some_value // for interactive debugging with VARIABLE env var set

IMAGE_NAME="${IMAGE_NAME:-imap-pipeline-core/imap-mag}"

echo "Running $IMAGE_NAME with dev.env file"

# check if the argument "DEBUG" or "-i" is passed
if [ "$1" == "debug" ] || [ "$1" == "DEBUG" ] || [ "$1" == "-i" ]; then
echo "Overriding entrypoint to be an interactive bash shell for debugging"
docker run --rm -it \
--entrypoint /bin/bash \
--env-file dev.env \
-v /mnt/imap-data:/data \
$IMAGE_NAME
elif [ -z "$1" ]; then # no args passed
docker run --rm -it \
--env-file dev.env \
-v /mnt/imap-data:/data \
$IMAGE_NAME
else
echo "Extra arguments: $@"
docker run --rm -it \
--env-file dev.env \
-v /mnt/imap-data:/data \
$@ $IMAGE_NAME
fi

0 comments on commit 1163a78

Please sign in to comment.