Comments (7)
Here is the recipe for docker image based on node:10-15-alpine, which has node v10 and yarn already installed.
One can use alpine-3.9 image too but would need to add build steps to install node and yarn/npm.
FROM node:10.15-alpine
RUN apk --no-cache add shadow \
gcc \
musl-dev \
autoconf \
automake \
make \
libtool \
nasm \
tiff \
jpeg \
zlib \
zlib-dev \
file \
pkgconf \
&& yarn install
from mozjpeg-bin.
Want to extend what @divick wrote.
With the current image of node:alpine these dependencies allowed me to build mozjpeg within my drone-runner
- name: npm install
image: node:alpine
commands:
- apk add autoconf automake libtool make tiff jpeg zlib zlib-dev pkgconf nasm file gcc musl-dev
- npm install
from mozjpeg-bin.
+1
from mozjpeg-bin.
@kachkaev I have been able to resolve this issue. On investigating I found that imagemin-mozjpeg installs mozjpeg-bin but in absence of autoconf, automake, libtool, make, gcc, musl-dev and nasm cannot build mozjpeg-bin from source and pulls in a GLIBC linked binary from github. Since alpine linux has musl-dev, the cjpeg cannot run without rebuilding/relinking with musl libc.
Just install the above packages with apk add and then do npm install and it should work.
from mozjpeg-bin.
As above, we need to install appropriate dependencies for mozjpeg to use it on any platform including alpine.
from mozjpeg-bin.
Great news @divick! Feel free to share the dockerfile recipe. I probably won’t change my setup for now, but people coming here from search will definitely be happy to see the solution!
from mozjpeg-bin.
Additionally you may need zlib-dev, pkgconf and file packages to be installed in alpine image.
from mozjpeg-bin.
Related Issues (20)
- EventEmitter memory leak detected!
- Build script issue HOT 3
- Please add environment variable to set bin download URL HOT 1
- Trying to install mozjpeg - behind corporate network HOT 2
- Can't build on raspberry pi. HOT 1
- MozJPEG 4
- mozjpeg pre-build test failed, and "autoreconf -fiv" HOT 2
- Bad gateway when Github is having operational problems
- Resolve dependency on logsalot related to CVE-2021-33623 HOT 1
- Apple Silicon M1 builds fail with incorrect path to libpng libraries HOT 7
- the path exist? mozjpeg\vendor\cjpeg.exe -baseline spawn HOT 1
- npm install error 7.1.1 HOT 16
- Build error after updates [email protected] HOT 10
- its not worked
- Bump `bin-wrapper` to latest stable package
- Using pre-compiled binary fails with got@^11.7.0 HOT 1
- mozjpeg preinstall failed
- mozjpeg not support on centos 7 HOT 1
- Release new version to npm HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mozjpeg-bin.