-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
[BUG]: Docker Compose import ignores hostname #289
Comments
hostname is forced to be the name of the container because otherwise it makes a lot of things confusing - that is the intended behaviour EDIT: sorry closed the issue too fast, could you send the compose you are using so I can try reproduce the issue? |
Sure:
When importing this Docker Compose snippet, the Cosmos Compose seems to recognize and apply the desired hostname correctly when clicking on Next:
But on the end, the resulting hostname was d329d1f3a41a, not mosquitto. Technical background: I prefer to use self-explanatory and static hostnames, so I can connect effortless to them. In that example I use Home Assistant, Zigbee2MQTT and other MQTT clients with the host 'mosquitto'. |
Tried it and it works with no issues on my end, my guess is you have something else (Unraid? Portainer?) that meddles with your container, because when you re-create container in docker, it re-assigns the hostname to some random BS (Docker quirks) That said, Cosmos is supposed to prevent Docker from doing this (yeah it's nice like that! But only if you recreate from Docker itself) but it's not working in this case because the container is not in bridge mode. So I will adjust the code |
Nope, just NixOS and Cosmos Server was the first container I deployed on Docker.
Aaah, re-creation seems to lead to this issue. I was able to scramble the hostname by just re-creating the container directly within Cosmos |
Yes that is fixed in the 0.16 branch now |
What happened?
When I import a docker compose, the hostname is ignored.
It could look like this:
Instead the hostname pihole, Cosmos Server creates some hostname like 97eb67d37625
Excerpt of generated Cosmos Compose:
What should have happened?
Create a new container with the hostname pihole.
How to reproduce the bug?
Relevant log output
No response
Other details
No response
System details
The text was updated successfully, but these errors were encountered: