dockerfile-parser-rs
dockerfile-parser-rs copied to clipboard
Escaped spaces in EnvVar value fails to parse
The following fails to parse:
ENV MY_DOG=Rex\ The\ Dog
could not parse Dockerfile: --> 1:17
|
1 | ENV MY_DOG=Rex\ The\ Dog␊
| ^---
|
= expected EOI or env_pair
Note the documentation mentions that spaces can be escaped with backslashes (example above is from the documentation):
The value will be interpreted for other environment variables, so quote characters will be removed if they are not escaped. Like command line parsing, quotes and backslashes can be used to include spaces within values.
https://docs.docker.com/engine/reference/builder/#env