Hello,
@moigagoo @Araq I very recently started using the Nim docker image in a small AWS + Nim experiment (also just started learning Nim), and the image seems to work great.
How much work would it be to make the Nim images docker-official (like those for python Python or Rust)?
I tend to think that making the images official could help people adopt Nim.
Cheers, Jukka
I'm all for passing the repo to nim-lang organization.
Another important thing that's missing now is CI integration.
@jackhftang FWIW, I personally started using @moigagoo's image because it is mentioned in the Nim docs: https://nim-lang.org/install_unix.html. It is, however, labeled as "Community managed".
@moigagoo This repository seems to contain the info on how to create and maintain official images: https://github.com/docker-library/official-images. This section in docker documentation also provides a tl;dr: https://docs.docker.com/docker-hub/official_images/#creating-a-docker-official-image. It looks like the docker-library project then handles the CI part?
Interestingly, Python's official image seems to be generated from https://github.com/docker-library/python, whereas Rust's appears to be generated from https://github.com/rust-lang/docker-rust.
Maybe @Araq or somebody else can chime in on which approach (image repo in docker-library or nim-lang organization) would be preferable for Nim? In any case, official images seem to be maintained collaboratively with the docker-library maintainers.
As to why we'd maybe want to have an official image:
Does nim-lang have an RFC type of process for proposing, deciding upon and planning this effort?
This would be great!
@moigagoo I could help with setting up Github Actions for building the images. Looks like you only have one dockerfile setup?
I'd also suggest making them proper multi-arch images too -- a lot of devs run M1/M2 macs now. I did it here for Nesper dockerbuilds.
Also is it possible to do statically linked Nim compiler builds? If so you can then provide an image with only the Nim compiler tooling and it could be used via multi-stage builds with distro.
Looks like you only have one dockerfile setup?
No, I have a number of flavors available. There's slim image with just the compiler, a larger image with nimble, an onbuild image to be used as a base for apps. There are two base images too: Ubuntu and Alpine.
The Dockerfiles are generated from Nim source files using source code filters.
There's a single binary that builds all the different combinations.
I've written this code a long time ago and I'm sure it can be improved.
I would like to extend what jpalomaki wrote: It'll likely also required a paid dockerhub subscription, as docker will no longer allow free tier team organizations as per an email sent out yesterday. Any free-tier organization currently operating (like the one the current nim-lang images are under) must either start paying within the next 30 days or have their organization and repositories deleted.
See: https://github.com/docker/hub-feedback/issues/2314 https://web.docker.com/rs/790-SSB-375/images/privatereposfaq.pdf https://nitter.net/justincormack/status/1635704358355468307 https://blog.alexellis.io/docker-is-deleting-open-source-images/
I'm of course also happy to forward you the email if you want it, though the exact wording is the same every time.
@Isofruit Thanks for the heads up
So that change would affect the existing nimlang dockerhub organization: https://hub.docker.com/u/nimlang, wouldn't it?
As to official images, they seem to be hosted under the _ namespace, so I am not sure if they are connected to any particular docker hub organization. See e.g. https://hub.docker.com/_/rust
@Araq I also just discovered https://github.com/nim-lang/RFCs, would it be appropriate to move this proposal there?
FYI to those reading here, I applied for the "nimlang" organization on dockerhub (which contains the docker images produced by the nimage project) to be admitted into dockers FOSS program.
This should be possible as nimage itself and thus the nimlang organization on there has no real plan towards monetization in any way shape or form except for possibly donations... though if we do I wouldn't even know how. Either way, we'll have to see whether that gets accepted or not, I'll keep you guys posted.
Coming back to the original idea in this thread (official images for Nim), I will go and post an RFC here, and we can go from there.
I will record all relevant findings from this thread, as a starting point.
Thanks everybody for your comments and interest!
Small update on the entire docker hub situation:
On March 14, 2023, we emailed you about your Free Team subscription, outlining our intention to sunset that plan. After listening to the concerns of the community, we’ve decided to reverse course, and are no longer sunsetting the Free Team plan.
If you’re currently on the Free Team plan, you no longer have to migrate to another plan by April 14.
So no longer are the nim images threatened with requiring a subscription (for now).