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

Docker-Compose hostnames don't appear to work #664

Closed
1 of 5 tasks
paradox460 opened this issue Mar 23, 2023 · 2 comments
Closed
1 of 5 tasks

Docker-Compose hostnames don't appear to work #664

paradox460 opened this issue Mar 23, 2023 · 2 comments

Comments

@paradox460
Copy link

Description

I've got a docker compose that has a few rabbitmq instances and a haproxy, and they talk to each other via hostnames specified via docker.compose.

In plain docker desktop, they boot fine and work fine, but when trying to switch to colima, the containers boot, then crash with failed to resolve hostname: rabbitmq-1 or similar.

Version

Colima Version: 0.5.4
Lima Version: 0.15.0
Qemu Version: 7.2.0

Operating System

  • macOS Intel <= 12 (Monterrey)
  • macOS Intel >= 13 (Ventura)
  • macOS M1 <= 12 (Monterrey)
  • macOS M1 >= 13 (Ventura)
  • Linux

Output of colima status

INFO[0000] colima is running using QEMU
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0000] address: 192.168.106.2
INFO[0000] socket: unix:///Users/dev/.colima/default/docker.sock

Reproduction Steps

  1. Create a simple docker compose file with a service that has a hostname, and another service that attempts to ping said hostname
  2. Run docker-compose
  3. Observe that the pinging service could not resolve the hostname of the other service, and terminates

Expected behaviour

The two different containers would be able to communicate with each other via docker-compose internal dns names

Additional context

No response

@abiosoft
Copy link
Owner

Can you kindly share a sample docker-compose file?

@paradox460
Copy link
Author

Well, this is embarrassing. I created a little test config, and when attempting to use it, found that it works fine.

I then went and double checked my problematic docker-compose, and found that the workers (rabbitmq, in this case) were failing because they cannot chown a mounted volume, and the haproxy could not reach hostname was just the last line in the log. Looks like the Chown issue can be simply resolved by setting uid:gid on the user (#54)

Sorry for the wrongful ticket!

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