igir icon indicating copy to clipboard operation
igir copied to clipboard

Feature: Add Dockerfile with multi-stage Node.js build

Open RetroHoarder opened this issue 8 months ago • 1 comments

  • 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

RetroHoarder avatar Apr 21 '25 13:04 RetroHoarder

: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.

github-actions[bot] avatar Apr 21 '25 13:04 github-actions[bot]

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.

emmercm avatar Jul 11 '25 22:07 emmercm

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!

RetroHoarder avatar Jul 12 '25 04:07 RetroHoarder

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]

emmercm avatar Jul 12 '25 17:07 emmercm

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.

emmercm avatar Jul 12 '25 17:07 emmercm

: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.

github-actions[bot] avatar Aug 12 '25 02:08 github-actions[bot]