Skip to content

Instantly share code, notes, and snippets.

@lloesche
Created May 30, 2017 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lloesche/482c72986fd739200a24c22d73b63ce7 to your computer and use it in GitHub Desktop.
Save lloesche/482c72986fd739200a24c22d73b63ce7 to your computer and use it in GitHub Desktop.
Marathon cmd/args tests
Dockerfile:
FROM alpine:edge
CMD ["Hello World"]
ENTRYPOINT ["echo"]
{
"id": "/marathon-test",
"instances": 1,
"container": {
"type": "DOCKER",
"docker": {
"image": "lloesche/marathon-test"
}
},
"cpus": 0.1,
"mem": 128
}
stdout: Hello World
{
"id": "/marathon-test-cmd",
"instances": 1,
"container": {
"type": "DOCKER",
"docker": {
"image": "lloesche/marathon-test"
}
},
"cpus": 0.1,
"mem": 128,
"cmd": "Command defined"
}
stderr: /bin/sh: Command: not found
{
"id": "/marathon-test-args",
"instances": 1,
"container": {
"type": "DOCKER",
"docker": {
"image": "lloesche/marathon-test"
}
},
"cpus": 0.1,
"mem": 128,
"args": ["Args defined"]
}
stdout: Args defined
{
"id": "/marathon-test-cmd-capital",
"instances": 1,
"container": {
"type": "DOCKER",
"docker": {
"image": "lloesche/marathon-test"
}
},
"cpus": 0.1,
"mem": 128,
"CMD": "CAPITAL CMD"
}
stdout: Hello World
{
"id": "/marathon-test-ucr",
"instances": 1,
"container": {
"type": "MESOS",
"docker": {
"image": "lloesche/marathon-test"
}
},
"cpus": 0.1,
"mem": 128
}
stdout: Hello World
{
"id": "/marathon-test-ucr-cmd",
"instances": 1,
"container": {
"type": "MESOS",
"docker": {
"image": "lloesche/marathon-test"
}
},
"cpus": 0.1,
"mem": 128,
"cmd": "Command defined"
}
stderr: sh: Command: not found
{
"id": "/marathon-test-ucr-args",
"instances": 1,
"container": {
"type": "MESOS",
"docker": {
"image": "lloesche/marathon-test"
}
},
"cpus": 0.1,
"mem": 128,
"args": ["Args defined"]
}
stdout: Args defined
{
"id": "/marathon-test-ucr-cmd-capital",
"instances": 1,
"container": {
"type": "MESOS",
"docker": {
"image": "lloesche/marathon-test"
}
},
"cpus": 0.1,
"mem": 128,
"CMD": "CAPITAL CMD"
}
stdout: Hello World
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment