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

[enhancement]: Host data structure not suitable for docker environment #3008

Open
1 task done
ScumbagSteve opened this issue Jan 16, 2025 · 4 comments
Open
1 task done

Comments

@ScumbagSteve
Copy link

No existing issues.

  • There is no existing issue for my request.

Description

When ioBroker runs as a Docker container, the Docker ImageID seems to be used as the hostname.
With each Docker update, the ImageID changes, which apparently also changes the hostname.
All data points that are used under system.host need to be reassigned.

In my system.host folder, there are numerous empty folders (the old ImageIDs). It took me a while to understand the background of these folders.

I see several areas for improvement:

  1. Support Docker users by allowing them to set a hostname during installation.
  2. Alternatively, retain the original hostname and not change it with every Docker update.
  3. Delete the outdated (empty) folders from system.host.
image

Why?

Unnoticed changes in data structures should be avoided by any cost. My automatizations did not run anymore and I only realized weeks later.

How?

No response

@foxriver76
Copy link
Collaborator

In the ìobroker.json the hostname can be set to a fixed name. I would assume that docker is doing this, more an issue for the official docker or are you not using the buanet container?

@ScumbagSteve
Copy link
Author

The hostname in the iobroker.json file seems to be the same I can fill under "hosts" tab --> edit.
If I set this one, it gets overwritten with the next docker update.

I am using the buanet container, thanks for pointing me in the right direction. I think I have to set "hostname" in Docker somehow. As I am using UNRAID (and therefore not directly using docker compose) I have to see how I can pass this variable. It's no environment variable apparently (these I can set).

You could still consider deleting the old folders in the data structure.

@buanet
Copy link
Contributor

buanet commented Jan 16, 2025

I have to see how I can pass this variable.

Simply set an extra parameter...

Image

BTW: Long time ago I have started my own ioBroker Unraid template (https://github.com/buanet/unraid-docker-templates/blob/main/iobroker_latest.xml) but as I never used Unraid in production there might be issues :)

@ScumbagSteve
Copy link
Author

Thanks, that worked!
I already contacted the publisher of the main unraid template to fix this.

I think originally there was an environment variable -e HOST_HOSTNAME = XXX that was used to set "UNRAID" as a standard hostname, but it seems this became effectless with an update (of the docker?) in the past. I can also not find this variable in your official documentation (anymore).

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

No branches or pull requests

3 participants