Release as a container? #7004
-
Would it be possible to release helix packaged as a container (singularity / podmain container for example)? That would be very convenient to make it easy to run helix without any dependence on the host, what packages are on it, etc. For example, I started using helix on my Ubuntu 22.04 computer using the AppImage and it works just fine. But trying to do the same on my Ubuntu 20.04, I get some glibc errors ( By releasing a singularity or podman container that runs helix, this kind of issue would disappear for users like me who need to run on some slightly older systems for some of their activity. |
Beta Was this translation helpful? Give feedback.
Replies: 15 comments 4 replies
-
Flatpak https://flathub.org/apps/com.helix_editor.Helix covers your concerns. So does the Nix package |
Beta Was this translation helpful? Give feedback.
-
Thanks for pointing this out. A few comments:
|
Beta Was this translation helpful? Give feedback.
-
PS: it also looks like the flatpak installation method is not mentioned in the doc? (at least if I am not missing something, I cannot see it at https://docs.helix-editor.com/install.html ). Maybe it would be useful to mention it there in a new section? :) |
Beta Was this translation helpful? Give feedback.
-
@blt-r I only just saw the flatpak, great work! Is it possible to get the Flatpak verified https://flathub.org/en-GB/apps/collection/verified/ ? I think now this new feature is out some people will steer clear of apps that are not verified. @jerabaul29 Yes, Flatpak definitely needs adding, I have done it: #6994 |
Beta Was this translation helpful? Give feedback.
-
In my mind, running a simple terminal based text editor in a container is pretty overkill. Have you looked at direnv with nix or https://github.com/numtide/devshell? That gives you dependencies per project without cluttering your OS. For my development workflow, the language servers that I use are only available in each project directory. So e.g. a Go project X has gopls and go compilers installed, whereas a python project Y, only has pyright and a python interpreter Apologies if this is not the answer you're looking for. I'm not sure if you can add dependencies to flatpak, you probably can by forking the package? Anyways, a full podman container is probably possible but you will have to give so many permissions that the whole "container" aspect is not really useful and just adds complexities |
Beta Was this translation helpful? Give feedback.
-
@jwijenbergh many thanks for the in-depth discussion :) . You are probably right, and I can try for now the flatpak + non containerized LSPs. If I meet issues getting LSPs to run and need to containerize them, then I can come back to this idea :) . Regarding the flatpak: I agree having it signed would be great, I do not like installing unsigned / unverified stuff, and I think more and more organizations are becoming more security aware and set stricter requirements on this kind of aspects (a bit similar to #6946 , each for their respective distribution way). |
Beta Was this translation helpful? Give feedback.
-
There are two ways to verify the flatpak.
|
Beta Was this translation helpful? Give feedback.
-
@blt-r Would you be OK to provide the file? @the-mikedavis Does this sound good to you? |
Beta Was this translation helpful? Give feedback.
-
We need to place
at
|
Beta Was this translation helpful? Give feedback.
-
@jerabaul29 the dockerfile for your issue is simple use archlinux:latest as it has latest helix/glibc in repos FROM archlinux:latest
RUN sudo pacman -Sy helix --noconfirm
RUN echo "helix installed"
EXPOSE 8080 This Dockerfile builds an image of archlinux with helix and run these below commands:-
|
Beta Was this translation helpful? Give feedback.
-
Thanks @sontaimnt ; question: why do you want to expose 8080? |
Beta Was this translation helpful? Give feedback.
-
There were people in this thread asking about adding language serves to the flatpak container. Flatpak has SDK extensions for doing that. And the Helix flatpak uses ide-flatpak-wrapper to make it easier to automatically enable the SDK extensions. I wrote instructions for doing that in helix_first_run.txt. That file should also automatically open the first time you run the flatpak. |
Beta Was this translation helpful? Give feedback.
-
We don't maintain the flatpak "officially" (i.e. none of the maintainers are involved with the package) so verification doesn't make sense in this case. We try to keep the set of official packages small to limit our maintenance burden when cutting a release. It's easy to create a container based on the binary builds attached to github releases, those in package managers or "from scratch" (building it with Rust and C/C++ toolchains) so I don't think we need to produce an official container image. |
Beta Was this translation helpful? Give feedback.
-
Coming back to this: I am trying to "build from scratch" in order to be able to develop a bit, but I am hitting issues (in particular, some issues similar to rust-lang/cc-rs#909 ). Wondering if it could be useful to provide a dockerfile that is able to build the project from source, so that this can be used as a common development environment where "everything should work"? |
Beta Was this translation helpful? Give feedback.
-
Other option is to use Linuxbrew . |
Beta Was this translation helpful? Give feedback.
Yes, https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-develop
You only need to install the package manager itself.