Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thaJeztah/aca082a2303b68875c4a to your computer and use it in GitHub Desktop.
Save thaJeztah/aca082a2303b68875c4a to your computer and use it in GitHub Desktop.
Some incorrect Dockerfiles for testing
CMD '["echo", "Well, JSON in a string is JSON too?"]'
CMD "[\"echo\", \"Phew, I just managed to escaped those double quotes\"]"
CMD ['echo','single quotes are invalid JSON']
CMD ["echo", "Please, close the brackets when you're done"
@thaJeztah
Copy link
Author

As discussed here; https://github.com/docker/docker/pull/7461/files

Not really sure if parsing the JSON itself is something that needs testing (as it is core functionality of Go), but how to handle the errors, i.e. what kind of feedback is given back to the user might be worth describing :)

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