Switch to Debian as base?
Problem/Motivation
I like to keep my Home Assistant instance as my development environment for things such as addons and frontend plugins, so that I can make modifications in such files, build them and do not need to copy them from my computer to my Hass, since they would be already there.
The SSH addon helps a lot with that, but there are some limitations which I found to be quite bad:
- The VS Code - Remote SSH cannot connect to it (because it does not support Alpine)
- Lots of things fail to compile or to execute on Alpine (e.g. Volta, node-gyp)
Expected behavior
If the base were Debian, none of these issues would be found (as in VS Code addon, everything works perfectly there -- except that SSH server isn't exposed there).
Actual behavior
Described above.
Steps to reproduce
N/A
Proposed changes
Switching to Debian would solve most of the issues caused using Alpine, at the expense of...
$ docker images | grep base
ghcr.io/hassio-addons/debian-base/amd64 6.0.0 4caf8ef75a9a 5 hours ago 96.9MB
ghcr.io/hassio-addons/base/amd64 12.0.0 79b575e6dfda 2 days ago 23.3MB
Not much, and the difference can be even lesser, as the Debian comes with some packages that aren't preinstalled in Alpine but would get preinstalled in SSH addon anyway.
Nevertheless, Debian is a more common environment for users (especially due to apt-get), which has some importance since the main goal of the SSH extension is to provide a distro-like environment inside Home Assistant.
Also, would make the VS Code addon and SSH addon more coordinated (e.g: users must know that in "Terminal" they use "apk", and in VS Code they use "apt-get").
Alternative
Instead of switching to Debian, we could also ship a variant. But I would rather jump directly to Debian to minimize maintenance. If not by the size, there aren't any benefits of using Alpine here (right?).
PS: I can help.
I have considered (and played with it many times before), for the same reasons.
There are more expenses, in terms of speed and size (besides the base image). That all said; My main concern is the sizable breaking change it brings. Many people use this add-on with additional packages and have logic from external (e.g., flows from HA).
That latter is the main reason I've never taken this step.
Nevertheless, Debian is a more common environment for users (especially due to apt-get), which has some importance since the main goal of the SSH extension is to provide a distro-like environment inside Home Assistant.
True, however, it has proven to be pretty valuable actually. Most tutorials found online do not work because of the missing apt. This is good, as users are often not aware this is a containerized environment.
True, however, it has proven to be pretty valuable actually. Most tutorials found online do not work because of the missing
apt. This is good, as users are often not aware this is a containerized environment.
Interesting.
My main concern is the sizable breaking change it brings. Many people use this add-on with additional packages and have logic from external (e.g., flows from HA).
Additional packages: indeed, users would need to refactor it for sure, but they also can take as inspiration the additional packages they have set for the VS Code addon.
Logic from external: I think it would be a little rare to have a script from HA to call apk commands, but don't have data to prove this point.
Also, Alpine is used to provide stripped binaries (like simplified versions of GNU Coreutils with fewer options or without --long-names options), in which the Debian variant of the same supersedes the functionality without breaking the existing ones.
If we decide to switch to Debian, we need to bump the major version and point out the points of concern:
- You need to rewrite
additional_packages - You need to review
init_commandsto ensure they are compatible with the new base - You need to review any scripts/command that you may run as
stdinservices to ensure they are compatible with the new base
I do understand the breaking changes are sizeable, but if it's of common sense that Debian would be a better choice for the base image, then I believe we should face the situation.
I have a Debian variant around, I know the implications of the change. But didn't do it before because of the above concerns.
I need to (at least) sleep over it
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
The bot marked it as stale, but its still on my todo (responding to get the bot to go away).
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
not stale...
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
Any updates on your thoughts? Tried to fork the repo and build my own debian variant but I'm getting lost along the way.