cyber-dojo / nginx

repo for the cyberdojo/nginx Docker image; a cyber-dojo microservice
https://cyber-dojo.org
BSD 2-Clause "Simplified" License
0 stars 9 forks source link

fix: Wrong shebang in nginx template port substitution script #4

Closed syalioune closed 2 years ago

syalioune commented 2 years ago

The script template-port-env-subst.sh uses a #!/bin/sh whereas explicit bash features are used for comparison if [[ ]].

During container startup, this cause the error below causing the docker part of the conditional to be unusable.

/docker-entrypoint.sh: Launching /docker-entrypoint.d/template-port-env-subst.sh
/docker-entrypoint.d/template-port-env-subst.sh: 12: /docker-entrypoint.d/template-port-env-subst.sh: [[: not found
/docker-entrypoint.d/template-port-env-subst.sh: 12: /docker-entrypoint.d/template-port-env-subst.sh: [[: not found

This fix enforces a bash shebang to prevent this issue.