-
Notifications
You must be signed in to change notification settings - Fork 62
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
Provide way of building zigup through Docker #88
Conversation
This looks well written and I appreciate the effort, but, I'm not sure supporting docker as a bootstrap method adds enough value for me to maintain it going forward right now. One thought I do have is if we we're to use a docker image, I think it could be cool/interesting to base it off a docker image that only contains the zig toolchain? Such an image would be interesting paired with another one of my projects: https://github.com/bettertools/zigenesis |
By using an image which already contains the right Zig version required by this project (i.e. the version would no longer be configurable through Something to consider is complexity. The Zig install procedure is just 7 LOC, so I wonder if it's worthwhile to pull another image just for that. This PR uses 1 - Sets up the environment variables Here we just have to download Zig and put it in
I would advise you to just copy-and-paste this: FROM docker.io/library/alpine:latest
RUN apk update && apk upgrade
RUN mkdir -p /tools
WORKDIR /tools
RUN apk add --no-cache curl tar xz
ARG ZIG_VERSION=0.11.0-dev.1507+6f13a725a
RUN curl -sSfL \
https://ziglang.org/builds/zig-linux-x86_64-"$ZIG_VERSION".tar.xz \
-o zig.tar.xz && \
tar -xf zig.tar.xz && \
mv zig-linux-x86_64-"$ZIG_VERSION" zig
ENV PATH="/tools/zig:$PATH" And add what you want after that. Like I mentioned above, this looks simple enough for a toolchain setup step. |
Understandable, I'll close the PR then. Feel free to reopen if there's interest. |
That's true right now, but, As far as using the alpine image for zigup, if we did support docker then this seems like a pretty good solution. I was more talking about using an image with just the Zig toolchain as an interesting way to verify/explore how minimal we could get dependencies for Zig projects in general. |
I suppose that this might be sufficient for closing #87
See https://github.com/resolritter/zigup/actions/runs/4841936672/jobs/8628552320 for a demo