Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escaping time waste #17

Open
borgdrone7 opened this issue Dec 9, 2024 · 0 comments
Open

Escaping time waste #17

borgdrone7 opened this issue Dec 9, 2024 · 0 comments

Comments

@borgdrone7
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant