-
Notifications
You must be signed in to change notification settings - Fork 17
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
Feature request: Update flag #95
Comments
I don't expect to find time to implement this any time soon. If you're interested in contributing, here's what I have in mind. I'd like this to be implemented in Go with no external dependencies. Other popular CLI tools that update themselves rely on hitting a well known URL to execute some installer script (deno, flyctl, etc). It's arduous to build something that allow the vendor to make live changes but retain artifact transparency. That's why I prefer the self update implementation to be embedded, so it's signed and whatever I ship is retained forever by proxy.golang.org's checksum tree. It needs to implement this cautiously with download and atomic name swaps, on all supported platforms. For the first version, maybe we can leave Windows out, but it should run on all Unixes with proper tmpdir handling. Interested in working on a PR? |
Heya, Unfortunately my skillset doesn't extend to writing programming languages, I'm an infrastructure/backend admin as a day job, so I wouldn't be the best choice to even start looking at how to implement the requirements. But I certainly see where you're coming from in terms of your requirements for the task. Would it be worthwhile keeping this open in case someone with the relevant skillsets wishes to take it on? |
Of course. I'm not closing this until such feature gets added. |
I found some time to work on building multi-architecture images with podman and pushed it to Docker Hub. The images are currently based on Alpine only. I'm guessing some people would prefer to have at least Debian there. As can be seen at https://hub.docker.com/r/runitor/runitor/tags, I could really use some testers with access to various Linux or ARM hardware. I tested these images with binfmt and QEMU on my build machine. They source the correct base image and the runitor binary, and pass the smoke test of sending a test ping. ...But nothing like running it on the real hardware. So if you have access to a Raspberry Pi with Docker or Podman, please report back. |
Basic check that image exists on Docker Hub.
Check it's a multi-architecture manifest
Test a non-native image
|
Can confirm it at least runs w/ Docker on x64. If using Alpine, I'd recommend installing bash as a lot of scripts will probably not be using an ash shell. |
I tested the arm64 image on AWS's Graviton 2 and Gravition 3 machines. Works as intended. Though I doubt there are any runitor users there burning with the desire to have container image to run on their Arm EC2 boxes.
I feel like I should leave all that to the end user, because these images are simply intended to be a base image for whatever workload image people want to build. I'm guessing they are going to invoke some |
I'm not sure if it is Docker Hub issue, or something else, but https://hub.docker.com/r/runitor/runitor/tags does not list any tags right now. And I get error messages about unknown manifest on the command line:
|
It was a joint effort between Docker Hub and yours truly. As I was iterating on my build script to make and push OCI images + manifests; I eventually hit Docker Hub's 100 pulls in 6 hours limit. I decided to call it a day and go to sleep. It's all pushed now. https://hub.docker.com/repository/docker/runitor/runitor/tags?page=1&ordering=last_updated |
Made some changes:
|
I tested on Raspberry Pi 400 with its factory image. Both "latest" and "debian" tags give me certificate errors:
The alpine tag works:
|
Bummer. For reasons I'm not certain about, debian and ubuntu base images doesn't ship with I was happy about my single Containerfile for 3 distributions and 3 architectures that didn't require binfmt QEMU emulation. Now even if I add detect debian || ubuntu and run Let me see if there's a more elegant way out. |
@cuu508 OK. I pushed new debian and ubuntu based manifests. I need to do qemu backed binfmt emulation while building these images now.
|
Awesome, all three variants work now:
Also tested on 64-bit ARM system (Radxa Zero):
|
@modem7 7935b78 merged and initial multi-arch image on Docker Hub, I'd like to close this issue, but continue keeping option 2 first and later option 1 in my possibly-to-do list. Regarding option 1: I thought about it and wrote a straw man implementation for self updates; but I wasn't content with the dependency tree I was dragging in (go/x/crypto/ssh and ssh signature verification from sigstore along with its dep chain). Implementing option 2 isn't a big deal, but instead of tying that feature to GitHub's mercy of not randomly taking down my account, I'd like to build it to either talk to Go Module Proxy or version check endpoint on a domain I control. |
That sounds great! Aye, for option two, a URL you control + a gpg key would certainly be a good solution! |
Would it be possible to have an -update flag which either:
This is more so that we can keep up to date with things, especially if we've missed a release notification.
The text was updated successfully, but these errors were encountered: