Hi!
After an entire year reviews and dozens of fixes, the Nim Docker Hub images are finally have the official status and can be pulled with docker pull nim
The new official home for the images is https://hub.docker.com/_/nim
No.
Honestly, this PR has been cooking for so long the merge caught me off guard, so I'll have to review all the places that need to be updated now.
And even after all the links and CI workflows are updates, I won't take the older images down because someone somewhere probably uses them.
To pass review, I had to reduce the number of image variants to review.
Slim flavor has been removed. I'm not sure it will be added back but if there's demand for it, I'll add it. AFAIK in general, slim flavors are considered deprecated in Docker Hub.
Arm images have been removed to speed up review. I'll add them separately later.
Older versions are just commented out for now. Again, to speed up review. Will add them later. However, some really ancient ones will not be added.
We need nodejs for the js backend so the full images always had to have it installed anyway. And the most reliable way to get a ln up-to-date node version is to base off of node image.
---
Now that the most painful part, the review, is over, we can fine-tune the images, e.g. introduce more flavors and architectures. Feel free to create issues at https://github.com/nim-lang/docker-images
This is a fantastic achievement!
I have enormous respect for the persistence and hard work you put into making this happen. I believe this is a meaningful step forward for everyone in the Nim community, myself included.
We need nodejs for the js backend so the full images always had to have it installed anyway. And the most reliable way to get an up-to-date node version is to base off of node image.
TBF this makes sense for this usecase:
docker run --rm -v "$(pwd)":/usr/src/app your-repo/nim:latest nim js -r main.nim
But how common is the pattern of someone running js through nim js -r without also needing to handle other aspects of JS (i.e. other js modules, bundlers etc.)
If was containerizing a nim -> js script/app I would think to implement it with a multi-stage build like this:
FROM nim:2.2.10 AS builder
WORKDIR /app
COPY . .
RUN nim js -o:app.js src/app.nim
FROM node:latest
WORKDIR /app
COPY --from=builder /app/app.js .
# more node stuff