-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
Trying to run a simple Dockerfile to install node together with sharp on linux/arm64 fails.
FROM node:14-slim
RUN npm i detect-libc
RUN node -e "console.log('platform=' + process.platform);console.log('arch='+process.arch);console.log(require('detect-libc'))"
RUN npm i sharpwhen ran on arm64 - it produces:
> [4/4] RUN npm i sharp:
#8 3.664
#8 3.664 > [email protected] install /node_modules/sharp
#8 3.664 > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
#8 3.664
#8 3.736 ERR! sharp Use with glibc 2.24 requires manual installation of libvips >= 8.10.0
#8 3.736 info sharp Attempting to build from source via node-gyp but this may fail due to the above error
#8 3.736 info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
#8 3.789 gyp ERR! find Python
while the arch checks gives:
platform=linux
arch=arm64
{
GLIBC: 'glibc',
MUSL: 'musl',
family: 'glibc',
version: '2.24',
method: 'getconf',
isNonGlibcLinux: false
}
There are already prebuild libvips images for arm64v8 - why aren't they used?
Running the same on Windows 10, goes actually just fine. While the arch checks is there pretty much the same:
Step 3/4 : RUN node -e "console.log('platform=' + process.platform);console.log('arch='+process.arch);console.log(require('detect-libc'))"
---> Running in 4c7db816aa17
platform=linux
arch=x64
{
GLIBC: 'glibc',
MUSL: 'musl',
family: 'glibc',
version: '2.24',
method: 'getconf',
isNonGlibcLinux: false
}
Removing intermediate container 4c7db816aa17
---> 68c8b2d9c3f4
Step 4/4 : RUN npm i sharp
---> Running in a617bbed12e4
> [email protected] install /node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.0/libvips-8.10.0-linux-x64.tar.br
+ [email protected]
added 73 packages from 173 contributors and audited 74 packages in 7.417s
@lovell I think the glibc check is a bit too hard and doesn't check for prebuild images first.
siedentop, hassanAdamineJad, AnnaVolodkova, Pkmmte, kalideir and 1 moretam315