Skip to content

Cannot override interpreter in entrypoint.d scripts #730

Open

Description

@mbrodala

Steps To Reproduce

  1. Add a custom entrypoint.d script
  2. Use #!/bin/bash as interpreter
  3. Use bash-specific features in this script

Outcome

What did you expect?

The script should run successfully.

What happened instead?

The script fails due to bashism, e.g.

/usr/local/bin/docker-php-serversideup-entrypoint: 50: /etc/entrypoint.d/50-startup.sh: Syntax error: redirection unexpected

The affected "line":

while IFS=',' read -ra examples; do
    for example in "${examples[@]}"; do
        echo $example
    done
done <<< "${EXAMPLES:-}"

Affected Docker Images

all

Anything else?

The page Adding Start Up Scripts suggests that Bash scripts are acceptable:

We recommend writing your script in /bin/sh for the best compatibility between Alpine and Debian. If you choose to use /bin/bash, your script will only be able to run on Debian-based images.

However, entrypoint scripts are currently sourced instead of executed which would explain why /bin/sh is enforced:

https://github.com/serversideup/docker-php/blob/v5.0.2/src/common/usr/local/bin/docker-php-serversideup-entrypoint#L48

The entrypoint itself uses /bin/sh:

https://github.com/serversideup/docker-php/blob/v5.0.2/src/common/usr/local/bin/docker-php-serversideup-entrypoint#L1

Activity

  1. added
    🧐 Bug: Needs Confirmation
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🧐 Bug: Needs Confirmation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions