Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Ports do not get published #30

Open
mbound opened this issue Oct 16, 2019 · 3 comments
Open

Ports do not get published #30

mbound opened this issue Oct 16, 2019 · 3 comments

Comments

@mbound
Copy link

mbound commented Oct 16, 2019

Hi,
I am trying to publish ports to the host from one container in my topology, but even though the docker-topo --create script appears to succeed, the port doesn't get published.

Here is the topology I am using:

VERSION: 2

CUSTOM_IMAGE:
      onos: onosproject/onos
PUBLISH_BASE:
      8181/tcp: 8383 # publish GUI port to host
#driver: veth
links:
    - endpoints: ["vmx-a1:eth0", "vmx-g1:eth0","vmx-b1:eth0","vmx-g2:eth0","onos:eth0"]
      driver: bridge
@mbound
Copy link
Author

mbound commented Oct 16, 2019

Actually, I've managed to answer my own question. I read through the source code and I can see that port publishing is by default only supported for CEOS and VEOS images (it wasn't apparent from the documentation).

With some tweaking to the code I was able to get it to work for the ONOS container as well.

Quick question though: why is it explicitly disabled for all other images including Alpine hosts?
The port publishing is implemented by Docker's API, so it shouldn't matter what VM/container image you are running internally, provided that it exposes the port you are looking for, right?

@networkop
Copy link
Owner

AFAIR, I only needed it for ceos/veos initially, hence https://github.com/networkop/docker-topo/blob/master/bin/docker-topo#L733
But yeah, it shouldn't make any difference what image it is, so feel free to do a PR if you want this upstreamed.

@mbound
Copy link
Author

mbound commented Jan 14, 2020

Thanks! I will clean it up a bit and do a PR as soon as i have a bit of time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants