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

Add Dockerfile #2848

Closed

Conversation

jharrilim
Copy link
Contributor

This PR adds a Dockerfile for creating a helix image that is ready-to-use for editing through volume mounts.

Usage

Building the image

docker build -t helix .

Running hx on your pwd

docker run --rm -it -v ${pwd}:/home/helixuser/workspace helix

Note: You may wish to clear your target dir before mounting the volume

Considerations

  • --release flag isn't currently set on cargo build; didn't seem wise to strip debug info for now
  • If this were to be pushed to a container registry, it would probably make sense to create a dev build that is similar in setup to the release stage, but is FROM build so that rust tooling is included. That would enable development from within the container for helix, within helix
  • I ran into cargo install fails at "tree-sitter-hare" due to SSL certificate expired #2415 while building, so I set HELIX_DISABLE_AUTO_GRAMMAR_BUILD=1. If this isn't affecting others it can be removed.
  • The exports in the ~/.bashrc exist in case you want to run the image with --entrypoint /bin/bash. The ENVs that do the same thing are needed for the ENTRYPOINT.

inspired by #2601 (comment)

@the-mikedavis
Copy link
Member

I think this is in a similar boat as #2601 - I'm not against it per se but I'd like to not have to support it if possible. Since it's such a slim container I don't think it's worth keeping it up (it would need maintenance any time the msrv / stable rust versions changed).

For reference, the Nix flake has a similar job and needs plenty of upkeep, but it's a special case because multiple maintainers use it for development and several users use it for installation

@the-mikedavis
Copy link
Member

I think this is better off as a gist. I'm not sure there's enough interest to justify maintaining it in-repo

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

Successfully merging this pull request may close these issues.

2 participants