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
Issues parsing $ symbol #9716
Comments
Since I upgraded to Docker Desktop for Mac 4.11 (from 4.9, I believe), this is now happening to me. Compose gives "Invalid template" errors if there are This only started happening after the upgrade, but we also moved from Actually, I just tested reverting to So this is definitely new post-upgrade. |
Thanks for the report! As per @ulyssessouza's message here: In
Can you try that and see if it works? |
Hi @laurazard, Alrighty, looks like we're cooking. The documentation is a bit confusing as it mentions it requires escaping. But your solution of single quote in the env file rather than double, without escaping seems to have worked well. Thank you. |
I'm glad it worked! We'll look into making the documentation clearer. |
Thank you! In future, for the .env file in Docker Compose V2, would you recommend single quoting or double quoting the content? E.g. (in a normal, non-edge case unlike the above): #HDDTemp
HDDTEMPARGS="-q -d -F /dev/sd*" or #HDDTemp
HDDTEMPARGS='-q -d -F /dev/sd*' |
Thanks, I was struggling on a similar problem in one of my |
@laurazard Can you elaborate on why this just started happening though? Other tools use the .env file and have no such requirement to use single quotes. I can see this being confusing as new team members come on board using double quotes as usual only to have us explain they need to switch the entire .env file to single quotes. Rinse and repeat. I'm wondering why a change like this wouldn't be an opt-in with a command-line flag or other setting instead of being the default. |
wow, this is such an obscure and hidden requirement that I must guess is wasting a lot of peoples time (at-least in my case it has been nothing but a frustrating chase to find the cause where all docker applications lost all db connectivity) ! There are many cases where password generation is offloaded to scripts that actually enforce that a password must contain symbols (additionally $ is probably also used quite a lot manually). This creates a scenario where it makes it very hard to find out that a $ somewhere is causing issues with the compose file.
Also as requested above, would like to understand if there is any reasoning behind this obscure issue with the $ needing to be escaped. |
Hey guys,
Got a weird one, might be user error.
I've got a service I'm trying to parse a bcrypt password through:
If I enter the credentials as above, it works as expected.
If I try entering it as an env var it does not:
.env:
docker compose show config
outputs the following:And obviously, if I don't escape the "$", I get the expected problem:
Any thoughts?
The text was updated successfully, but these errors were encountered: