Created
June 1, 2026 14:42
-
-
Save jonpugh/08151404e97e3e2f4d00269c3b6434c2 to your computer and use it in GitHub Desktop.
Dockerfile Entrypoint script that runs BOOT_COMMAND before whatever the docker command is.
This file contains hidden or 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
| #!/bin/bash | |
| set -e | |
| echo "Hello from docker-entrypoint-boot-command!" | |
| if [[ -n "${BOOT_COMMAND}" ]]; then | |
| echo "> Running BOOT_COMMAND:" | |
| echo $BOOT_COMMAND | |
| echo | |
| echo ============================ | |
| ${BOOT_COMMAND} | |
| echo ============================ | |
| echo "> Ended BOOT_COMMAND" | |
| fi | |
| echo "> Running command:" | |
| echo "$@" | |
| echo | |
| echo ============================ | |
| exec "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment