b9fe748ee2
author Yossi Farjoun <farjoun@broadinstitute.org> 1617479686 -0400 committer Yossi Farjoun <farjoun@broadinstitute.org> 1618455120 -0400 Change the way the script is run. instead of modfying the ENTRYPOINT, we will simply add the "shell" (default sh) and the "script_prefix" (default -c) and then the script. That way the possible comple entry point is not disturbed. if a user would like to remove the ENTRYPOINT they can provide an "option" "--entrypoint ''" for example.
11 lines
405 B
Bash
Executable file
11 lines
405 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
if [ ! -z $INPUT_USERNAME ];
|
|
then echo $INPUT_PASSWORD | docker login $INPUT_REGISTRY -u $INPUT_USERNAME --password-stdin
|
|
fi
|
|
|
|
if [ ! -z $INPUT_DOCKER_NETWORK ];
|
|
then INPUT_OPTIONS="$INPUT_OPTIONS --network $INPUT_DOCKER_NETWORK"
|
|
fi
|
|
|
|
exec docker run -v "/var/run/docker.sock":"/var/run/docker.sock" $INPUT_OPTIONS $INPUT_IMAGE $INPUT_SHELL $INPUT_SCRIPT_PREFIX "${INPUT_RUN//$'\n'/;}"
|