Feature: Add Dockerfile with multi-stage Node.js build
- Uses Node 18-slim for build and runtime
- Installs dependencies and builds TypeScript in build stage
- Copies only dist and package files to production image
- Suitable for running the igir CLI tool in Docker
:test_tube: Branch testing instructions
This pull request can be tested locally with the following command:
npm exec --yes -- "github:RetroHoarder/igir#main" [commands..] [options]
Comment generated by the Node.js Branch Exec workflow.
I'm so sorry @RetroHoarder, you've gone a long time without a response from me. I apologize for that.
I'm curious what your use case is for Docker? I used to have instructions for Docker on https://igir.io/installation/, but I removed them in https://github.com/emmercm/igir/pull/1245/files#diff-8b042e3f94ca5c59a7cd990b950aec0073ea84fe811e7b22be51158d7b180d56.
My thinking with the Dockerfile is that the reason to add it would be if I were to publish and maintain an image on Docker Hub, which I'm no stranger to, but I'm not sure the maintenance cost would be worth it. Due to the slowness of volume mounts, I think most people are better off installing Node.js directly and only using Docker as a last resort. So that's why I'm curious to hear about your use case here.
Hello @emmercm,
I'm so sorry @RetroHoarder, you've gone a long time without a response from me. I apologize for that. No worries
I'm curious what your use case is for Docker? I used to have instructions for Docker on https://igir.io/installation/, but I removed them in https://github.com/emmercm/igir/pull/1245/files#diff-8b042e3f94ca5c59a7cd990b950aec0073ea84fe811e7b22be51158d7b180d56.
For security reasons, I’ve been using Docker to run software. Since I’ve been doing this, I thought I’d propose a PR. I understand if you don’t want to merge it.
Cheers and thanks for making Igir!
Wanting to sandbox software makes sense, especially because Igir requires several binaries to function (7za, chdman, maxcso, dolphin-tool) and a few NAPI binaries (zstd, zlib, and probably more in the transitive dependencies).
Understanding that it would incur a download & install cost every time, this might make your setup more future-proof:
docker --rm \
--volume "$PWD:/pwd" \
--workdir "/pwd" \
node:lts \
npx --yes igir@latest [commands..] [options]
Again, thank you for the proposal @RetroHoarder! I'm going to close this as rejected for now, but others should open a discussion thread if you would find value in something like this.
:lock: Inactive pull request lock
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Comment generated by the GitHub Lock Issues workflow.