question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Redo docker-compose setup without using 'host' mode networking

See original GitHub issue

Steps to reproduce

$ git clone https://github.com/hubspot/singularity
$ cd singularity
$ docker-compose pull
$ docker-compose up
(browse to http://localhost:7099/singularity or http://localhost:8080/baragon/v2/ui)

Expected: pages for either to be served. Actual: can’t open connection to server.

docker version 1.12.1 (build: 12133) docker-compose version 1.8.0, build f3628c7 mac osx sierra 10.12 (16A323)

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ssalinascommented, Nov 10, 2016

Thanks for the input @felixgborrego . Tried the docker for mac bit myself and it does seem like there isn’t a clean way to get host networking mode working in an easy manner. Renaming the issue here to reflect that we need to get the dev setup working with port mappings and container linking. There will be a few tricky pieces like getting the mesos slave api to play nicely and getting hostnames within the containers correct, but can probably be done with a bit of tinkering.

0reactions
felixgborregocommented, Nov 8, 2016

I run into the same issue using “Docker for Mac”(docker 1.12.1). singularity_scheduler_1 log actually looks good. But “net:host” only exports the ports within xhyveVM and they are not accessible from MacOS as far as I know.

For now, just to be able to test it on Mac, I needed to go back to docker-machine + virtualbox + ssh tunnelling[1]. I may try to rewrite docker-compose.yml exposing ports and using link between containers.

It’s really a Docker for Mac issue, more context: https://forums.docker.com/t/should-docker-run-net-host-work/14215/22 https://forums.docker.com/t/explain-networking-known-limitations-explain-host/15205/2

[1] a hack to see Singularity UI at localhost:7099 docker-machine ssh default -N -L 5050:localhost:5050 -L 7099:localhost:7099

Read more comments on GitHub >

github_iconTop Results From Across the Web

Networking in Compose - Docker Documentation
How Compose sets up networking between containers. ... Consult the Swarm mode section, to see how to set up a Swarm cluster, and...
Read more >
docker compose up - Docker Documentation
The docker compose up command aggregates the output of each container (like docker compose logs --follow does). When the command exits, all containers...
Read more >
Use host networking - Docker Documentation
Host mode networking can be useful to optimize performance, and in situations where a container needs to handle a large range of ports,...
Read more >
Networking with standalone containers - Docker Documentation
Networking with standalone containers. This series of tutorials deals with networking for standalone Docker containers. For networking with swarm services, ...
Read more >
host in docker compose file not working as expected
I was able to partially get around this issue by passing --network host to our docker build commands. This binded the containers to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found