Skip to content

Instantly share code, notes, and snippets.

@ConnorDoyle
Created September 10, 2014 06:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ConnorDoyle/b5a3fe1fa6d71679bb92 to your computer and use it in GitHub Desktop.
Save ConnorDoyle/b5a3fe1fa6d71679bb92 to your computer and use it in GitHub Desktop.
Marathon app definition demonstrating how to run a task inside a docker container with bridged networking.
{
"id": "bridged-webapp",
"cmd": "python3 -m http.server $PORT0",
"cpus": 0.5,
"mem": 64.0,
"instances": 2,
"container": {
"type": "DOCKER",
"docker": {
"image": "python:3",
"network": "BRIDGE",
"portMappings": [
{ "containerPort": 8080, "hostPort": 0, "protocol": "tcp"},
{ "containerPort": 161, "hostPort": 0, "protocol": "udp"}
]
}
},
"healthChecks": [
{
"protocol": "HTTP",
"portIndex": 0,
"path": "/",
"gracePeriodSeconds": 5,
"intervalSeconds": 20,
"maxConsecutiveFailures": 3
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment