Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a workaround to have multiple projects running and talking on MacOS #127

Closed
damienalexandre opened this issue Jan 6, 2021 · 2 comments

Comments

@damienalexandre
Copy link
Member

damienalexandre commented Jan 6, 2021

We want to use two Docker stater based project at the same time.

And project A needs to talk to project B.

It works well on Linux but as the network_mode "host" is not available on MacOS and Windows, we are stuck.

# Docker for Mac or Windows does not support the "network_mode=host"
# So we use the default network mode and we map all needed ports

docker/for-mac#1031

We added this on our frontend from project A:

    frontend:
        build: services/frontend
        extra_hosts:
            - 'project-b.test:172.17.0.1' # Allow talking to project B, docker0 IP
@lyrixx
Copy link
Member

lyrixx commented Jan 6, 2021

If you control both projet, you can put both projets in the same docker network. Then to access a container, use its name

@lyrixx
Copy link
Member

lyrixx commented Jan 6, 2021

Closing, as explained :)

@lyrixx lyrixx closed this as completed Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants