Build different versions of mozjpeg
ThibaultLemaire opened this issue · 6 comments
If I don't need the latest mozjpeg but rather, say, v3.0, it would be nice to be able to configure this image to build a given git tag from mozilla/mozjpeg.
Ideally this tag would also be used as a docker tag on the docker hub.
Hi, @ThibaultLemaire 👋 I would be really happy to accept a PR for this feature!
Well I've been looking into it, and apparently mozjpeg only recently adopted cmake based compilation. Which is a problem because your script, as is, basically works only for the latest version.
I have tried and failed to checkout other tags and build with cmake. Even v3.3.2 (the latest as far as I can tell judging from the github release page) doesn't build that way.
So I'm afraid this won't be as trivial as I first anticipated.
@ThibaultLemaire I've updated the Dockerfile to be able to build a custom version of mozjpeg
. Tested with all tags starting from 2.0
.
docker build -t mozjpeg-docker --build-arg tag=v3.0 .
OK, apparently I've tested all tags except master
. Master throws autoreconf: 'configure.ac' or configure.in' is required
, related to #1.
Thank you very much, now I can build the version I need. Do you think you could push some tagged versions to the DockerHub like major images do?
But I see you had to switch back to autotools for it to work. Doesn't that bother you? How do you plan on supporting newer versions?
I pushed the 3.0
tag manually: https://hub.docker.com/r/egorovli/mozjpeg.
FROM egorovli/mozjpeg:3.0
Cheers!