A deploy of a Solana payments backend failed on Coolify with a Dockerfile parse error: unexpected end of statement while looking for matching double-quote. Nothing in the Dockerfile had changed. The culprit was an environment variable.
Coolify injects every env var marked “Available at Buildtime” directly into your Dockerfile as an ARG line — unescaped. My variable held a pretty-printed JSON array of RPC URLs, complete with newlines and quotes. Coolify pasted it into the build as-is, the multi-line value tore the ARG statement apart mid-quote, and Docker’s parser gave up before a single layer was built.
The confusing part is where the error points: at the Dockerfile, which is fine, rather than at the dashboard setting, which isn’t. If you’re diffing your Dockerfile looking for the broken quote, you’ll never find it — the broken line only exists in the generated build context Coolify assembles.
The fix took one checkbox: uncheck “Available at Buildtime” for that variable so it’s only injected at runtime, where it’s passed as a proper environment value instead of being spliced into Dockerfile syntax. The build went green immediately.
The rule I follow now: anything that is JSON, multi-line, or a secret stays runtime-only in Coolify. Build-time injection is for simple scalar flags. If a build genuinely needs structured config, base64-encode it into a single line and decode inside the build — but first ask whether it really needs to exist at build time at all. Mine didn’t.