-
Notifications
You must be signed in to change notification settings - Fork 213
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
Download links without a version number #386
Comments
For the combined tarball: maybe, if there's significant demand for it? This complicates the build system and makes it a bit more confusing for users to know exactly what tarball(s) they need, and isn't ideal for integration with distributions, which is why I went with separate tarballs, but if it's more comfortable for more users, we could consider it in the future. For a static link to the latest tarballs: that's a good idea indeed, having a |
This is not a good practice, there is no guarantee that the latest version works the way you want it to. But here is a small workaround latest_version=$(curl -sL https://api.github.com/repos/just-containers/s6-overlay/releases/latest | jq -r ".tag_name")
wget https://github.com/just-containers/s6-overlay/releases/download/$latest_version/s6-overlay-noarch-"${latest_version:1}".tar.xz |
Regarding having the latest version always at the same link - I think the easiest way would be for the There's not a way to make github provide a I would be concerned about the non-reproducibility factor of using a dynamic link like that. My advice is to track the version either in the Dockerfile directly, or in some other file that specifies the version used as a build argument. But that's just advice - it's not my place to force anybody to follow my perceived best practices. @skarnet - what would you prefer - for the build system to produce version-less tarballs, or for the CI system to rename them prior to upload? |
@jprjr It is totally your place to provide our software according to what you think are good practices. Users already follow a ton of bad practices shoved down their throats by moronic upstreams, some good ones would be a nice change. 😛 I really don't like the idea of only outputting version-less tarballs. I think it's a disservice to users, and makes debugging pretty difficult. If GitHub can't make symlinks, then having |
So, my thought was we upload the second set of tarballs tagged Another idea is we have a long-running, continuously-updated release named The last idea is, we just say no - keep the versioned tarballs as-is, @GreyXor has a decent work-around to determine the latest release already. I don't think it's a good practice to blindly use the latest version of anything. Granted, a downstream user may have enough rigorous, automated testing to catch an upgrade-related issue before it goes to production. But I also think that kind of user is going to use a specific, tested version anyway. |
@jprjr @skarnet We already have a version number in the URL The workaround provided by @GreyXor will work, but it is imperative and requires some scripting. You cannot go with that using the There is another downside of having a version in the tarball names. Let's say you are installing that from a shell script. In that case, it will make the logic a bit more complicated since you need to know the exact version of the downloaded tarball. Stripping the version number will enable users to fully decouple downloading and extracting logic. Creating a magic release like It seems like having a version number in the tarball name requires some hacks and workarounds from the user's side. And at the same time, stripping them does not deprive the option to pin the version and works in all use cases. What do you think? |
@dokmic I disagree with your reasoning: users who download tarballs should always know exactly what they are installing, so they should know the version number. |
I removed the version numbers from the generated tarball names. The CI should keep working as is, but just in case, @jprjr can you verify? The new version (3.1.0.0) isn't ready yet, I'm working on it; this is one of the changes that will go into it. |
For a Dockerfile perspective it would be more efficient to rely on a "distribution" s6-overlay image that would be a multi-platform one and would have all the required tooling in a scratch stage like https://github.com/crazy-max/docker-alpine-s6#usage. This way users could simply do: ARG S6_OVERLAY_VERSION=3.1.0.0-1
FROM just-containers/s6-overlay:$S6_OVERLAY_VERSION AS s6-overlay
FROM ubuntu
COPY --from=s6-overlay / /
RUN apt-get update && apt-get install -y nginx
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
CMD ["/usr/sbin/nginx"]
ENTRYPOINT ["/init"] instead of # Use your favorite image
FROM ubuntu
ARG S6_OVERLAY_VERSION=3.1.0.0-1
RUN apt-get update && apt-get install -y nginx xz-utils
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
CMD ["/usr/sbin/nginx"]
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz
ENTRYPOINT ["/init"] It removes many layers and doesn't require to install extra deps like |
That ties you to the Docker container manager, though. We could pursue better integration with Docker in the future, though. |
Oh sure I didn't mean to imply that we should only rely on an image but as a distribution alternative.
Happy to help if you want. |
I also think that @crazy-max's suggestion is really nice and greatly simplifies installation in |
First of all, thanks a lot for all the hard work on the v3 release 👏
While migrating to the latest version, I noticed that it is no longer possible to have a static link to the latest tarballs. Is it possible to remove the version number from the generated files names?
For example, previously, it was possible to get the latest S6 overlay by doing this:
After the v3 release, it is no longer possible, and you should always explicitly specify the version:
Looking at these two
Dockerfile
's, do you perhaps consider providing a combined tarball containing noarch and arch contents altogether? So the overlay could be installed by downloading just one link. That should save some time on some CI's and simplify the user'sDockerfile
.The text was updated successfully, but these errors were encountered: