Skip to content

Instantly share code, notes, and snippets.

@MartinBasti
Created November 30, 2018 14:25
Show Gist options
  • Save MartinBasti/c9e9ff92ff09a28e995a7e66b159d02f to your computer and use it in GitHub Desktop.
Save MartinBasti/c9e9ff92ff09a28e995a7e66b159d02f to your computer and use it in GitHub Desktop.
Dockerfile single/double quotes in ENTRYPOINT

Double quoted entry point value

$ cat Docketrfile
FROM fedora
ENTRYPOINT ["echo"]
$ docker run --rm echotest hello     
hello

Works as expected

Single quoted entrypoint value

$ cat Dockerfile
FROM fedora
ENTRYPOINT ['echo']
$ docker run --rm echotest hello     
hello: [echo]: command not found

Is not working :-(

From docs: "Note: The exec form is parsed as a JSON array, which means that you must use double-quotes (“) around words not single-quotes (‘)." (https://docs.docker.com/engine/reference/builder/#shell-form-entrypoint-example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment