How to launch a docker bundle with specified exposed ports?
<p>If you are not familiar with docker bundles please read <a href="https://blog.docker.com/2016/06/docker-app-bundle/" rel="nofollow">this.</a></p>

<p>So I have tried to create a simple docker bundle from the following <code>docker-compose.yml</code></p>

<pre><code>version: "2"
services:
  web:
    image: cohenaj194/apache-simple
    ports:
      - 32701:80
  nginx:
    image: nginx
    ports:
      - 32700:80
</code></pre>

<p>But the ports of the docker services this bundle created were not exposed and I could not access any of the containers in my services through ports 32700 or 32701 as I specified it in the<code>docker-compose.yml</code>.  How am I supposed to expose the ports of docker bundle services?</p>

<p><strong>Update:</strong> I believe my issue may be that my <code>test.dab</code> file that is created with <code>docker-compose bundle</code> does not contain any mention of port 32700 or 32701:</p>

<pre><code>{
  "Services": {
    "nginx": {
      "Image": "nginx@sha256:d33834dd25d330da75dccd8add3ae2c9d7bb97f502b421b02cecb6cb7b34a1b6", 
      "Networks": [
        "default"
      ], 
      "Ports": [
        {
          "Port": 80, 
          "Protocol": "tcp"
        }
      ]
    }, 
    "web": {
      "Image": "cohenaj194/apache-simple@sha256:6196c5bce25e5f76e0ea7cbe8e12e4e1f96bd36011ed37d3e4c5f06f6da95d69", 
      "Networks": [
        "default"
      ], 
      "Ports": [
        {
          "Port": 80, 
          "Protocol": "tcp"
        }
      ]
    }
  }, 
  "Version": "0.1"
}
</code></pre>

<p>Attempting to insert the extra ports into this file also does not work and results in the following error:</p>

<pre><code>Error reading test.dab: JSON syntax error at byte 229: invalid character ':' after object key:value pair
</code></pre>

<p><strong>Update2:</strong> My services are accessible over the default ports docker swarm assigns to services when the host port is not defined:</p>

<pre><code>user@hostname:~/test$ docker service inspect test_nginx --pretty
ID:     3qimd4roft92w3es3qooa9qy8
Name:       test_nginx
Labels:
 - com.docker.stack.namespace=test
Mode:       Replicated
 Replicas:  2
Placement:
ContainerSpec:
 Image:     nginx@sha256:d33834dd25d330da75dccd8add3ae2c9d7bb97f502b421b02cecb6cb7b34a1b6
Networks: 1v5nyqqjnenf7xlti346qfw8n
Ports:
 Protocol = tcp
 TargetPort = 80
 PublishedPort = 30000
</code></pre>

<p>I can then get at my service from port 30000 however I want to be able to define the host port my services will use.</p>