Skip to content

Escaping time waste #17

@borgdrone7

Description

@borgdrone7

I’ve encountered an issue with your Docker image when trying to pass a MESSAGE variable through a docker-compose.yml file. Special characters like <, >, ', /, and & in MESSAGE cause issues due to YAML parsing limitations and the lack of proper escaping in the sed command within your entrypoint script. For example, the following setup results in either YAML parsing errors or {{message}} not being replaced in index.html:

environment:
  MESSAGE: "We’re working hard to resolve issues. Please contact us at <a href='mailto:example@example.com'>contact us</a>."

Additionally, if you escape / with \/ to make it work with sed, YAML itself breaks. To improve usability, consider pre-escaping special characters in the entrypoint script (e.g., using sed 's/[&/]/\&/g') or documenting that the image isn’t designed for complex environment variables via Docker Compose. This would save users significant troubleshooting time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions