srtool-cli icon indicating copy to clipboard operation
srtool-cli copied to clipboard

Add `--local-registry` and `--tag` flags

Open jmg-duarte opened this issue 1 year ago • 0 comments

Some context:

I need to build a custom srtool image because I need an OpenCL library for the compilation process, as such, I need to add the install command to the srtool image. I used just build there and noticed that it always tries to fetch the image from docker.io which is less than ideal.

I've added the two flags in the title:

  • --local-registry — allows users to use volumes to share the local registry with Docker, the idea is to speed up builds but in this case I'm not 100% sure it helps A TON
  • --tag — allows users to set the tag, this is useful if you're building your custom docker image

I've moved the SRTOOL_TAG env var OUT of the library since it is essentially hidden control flow when used there. We can also replace the tag flag with a split on : to detect a tag on a Docker image.

jmg-duarte avatar Dec 17 '24 16:12 jmg-duarte