-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 3.4 uses cmake #37
Comments
For reference I've got mozjpeg building in Alpine docker image(part of a multi-stage build) like so:
Would be nice to be able to use that binary as the current one doesn't seem to be compatible on alpine. If the |
@polarathene Did u make this library with imagemin work in linux alpine? I am struggling to make it work, I tried different library versions and installing different build tool in my docker image but is not working in any way. These are the versions that I used in my last tests:
This is how I am using the library:
And this is my Dockerfile:
|
After hours of research and experimenting with different settings, I managed to resolve My updated Dockerfile:FROM node:12-buster-slim
RUN npm i npm@latest -g
WORKDIR /usr/src
COPY ./app/package*.json ./
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
g++ \
libpng-dev \
make\
nasm \
-y wget \
&& wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb \
&& dpkg -i /tmp/libpng12.deb \
&& rm /tmp/libpng12.deb \
&& npm install --no-optional && npm cache clean --force \
npm install -g gulp \
&& npm install gulp
ENV PATH /usr/src/node_modules/.bin/:$PATH
WORKDIR /usr/src/app
COPY . .
These settings might save you hours of frustration. BTW Node's Happy coding! |
Just a heads up with version 3.4(mozjpeg version 3.4.0 (build 20190102)
), they no longer use autotools to build, so your current build script will fail when updating to a newer version. cmake is used now.
The text was updated successfully, but these errors were encountered: