-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix line ending in pre-commit
- Loading branch information
1 parent
4e8d20e
commit 1163a78
Showing
1 changed file
with
32 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |