WORKED CASE · SYNTHETIC TEST DATA
Retain spaces inside a Docker environment value
Splitting a command on every space corrupts quoted arguments. Use one quoted value to check that the image name and environment remain separate.
Input and settings
docker run -e GREETING="hello world" nginxRun and interpret
Convert the sample. The image remains nginx and the environment contains the complete hello world value. The command is only parsed, never run.
Expected output
image: nginx
GREETING=hello worldScope and possible misuse
Only the documented literal argument subset is supported. Shell expansions, unknown options and named volumes are rejected; review the generated file with your Compose version before using it.