mesos-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Young <>
Subject Docker port-forwarding in mesos 0.20.0
Date Fri, 05 Sep 2014 01:28:28 GMT
I need port-forwarding for my Docker containers, so I guess my question is, can I still use
the mesos-docker executor that I used in 0.16.0 with 0.20.0 if I have to? Has the API for
executors change enough that it wouldn't be worth it?


From: Ted Young
Sent: Wednesday, September 03, 2014 6:14 PM
Subject: RE: Docker -p hostPort:containerPort in mesos 0.20.0


I we are looking at upgrading to the latest Mesos + Marathon, but we need support of the Docker
port forwarding (we had a modified version of the mesos-docker executor that worked nicely).
Is there an existing way (using an alternate containerizer) that still supports Docker port
forwarding for a container? Building from source is probably fine, if there's no released
support yet.


From: Tim Chen []
Sent: Thursday, August 28, 2014 6:40 PM
Subject: Re: Docker -p hostPort:containerPort in mesos 0.20.0

Hi Steve,

Yes the plan is to put it in the next release.


On Thu, Aug 28, 2014 at 4:08 PM, Steve Domin <<>>
Hi Tim,

Do you think that's going to be part of the next release of Mesos?


On Thu, Aug 28, 2014 at 11:56 PM, Tim Chen <<>>
Hi Javier,

Like Ryan said the network mode is not configurable at the moment, I'm planning to add bridge
network and port mappings next.



On Thu, Aug 28, 2014 at 3:51 PM, Ryan Thomas <<>>

I believe that the docker containerizer in mesos is hard coded to use host-based networking
at the moment. i.e. the --net=host flag.

This means that the ports the container binds to internally will be on the slaves interface
and exposed.
On 29 Aug 2014 08:45, "Javier Ruiz Jiménez" <<>>
Hi All

I am translating all our Marathon API calls to new format for Marathon 0.7.0-SNAPSHOT as we
have upgraded to Mesos 0.20.0.

I used to map some container ports to well known host ports.

Example from when using Deimos:

 "options" : ["-p","9000:9000"]

Following Marathon upgrade guide in

  "container": {
    "image": "docker:///megacorp/product:1.2.3",
    "options": [
      "-v", "/var/data/a:/etc/a:ro",
      "-v", "/var/data/b:/etc/b:rw",
      "-e", "FOO=bar",
      "-p", "443:443"

Gets translated to:

  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "megacorp/product:1.2.3"
    "volumes": [
        "hostPath": "/var/data/a",
        "containerPath": "/etc/a",
        "mode": "RO"
        "hostPath": "/var/data/b",
        "containerPath": "/etc/b",
        "mode": "RW"
  "env": {
    "FOO": "bar"
  "ports": [443],
  "requirePorts": true

But if I do the same, docker ps shows no port mappings for the container. No ports are mapped.

Any suggestions?
How can I see the "docker run command " that mesos executes?


View raw message