gpt4 book ai didi

docker - Jenkins构建无法安装pngquant

转载 作者:行者123 更新时间:2023-12-02 20:38:11 27 4
gpt4 key购买 nike

我正在Docker中运行此Jenkins Image

在我的其中一个版本中,我尝试安装以下软件包:json
"devDependencies": {
"@babel/core": "^7.0.0-beta.40",
"@babel/preset-env": "^7.0.0-beta.40",
"babel-loader": "^8.0.0-beta.0",
"css-loader": "^0.28.11",
"file-loader": "^1.1.11",
"html-webpack-plugin": "^3.1.0",
"image-webpack-loader": "^4.2.0",
"node-sass": "^4.8.3",
"sass-loader": "^6.0.7",
"style-loader": "^0.20.3",
"webpack": "^4.0.1",
"webpack-cli": "^2.0.13",
"webpack-dev-server": "^3.1.1"
}

但是,在尝试安装pngquant-bin@4.0.0时,构建始终失败:

> node-sass@4.8.3 install /var/jenkins_home/workspace/crypto-coaster/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.3/linux-x64-57_binding.node
Download complete
Binary saved to /var/jenkins_home/workspace/crypto-coaster/node_modules/node-sass/vendor/linux-x64-57/binding.node
Caching binary to /var/jenkins_home/.npm/node-sass/4.8.3/linux-x64-57_binding.node

> cwebp-bin@4.0.0 postinstall /var/jenkins_home/workspace/crypto-coaster/node_modules/cwebp-bin
> node lib/install.js

✔ cwebp pre-build test passed successfully

> gifsicle@3.0.4 postinstall /var/jenkins_home/workspace/crypto-coaster/node_modules/gifsicle
> node lib/install.js

✔ gifsicle pre-build test passed successfully

> mozjpeg@5.0.0 postinstall /var/jenkins_home/workspace/crypto-coaster/node_modules/mozjpeg
> node lib/install.js

✔ mozjpeg pre-build test passed successfully

> optipng-bin@3.1.4 postinstall /var/jenkins_home/workspace/crypto-coaster/node_modules/optipng-bin
> node lib/install.js

✔ optipng pre-build test passed successfully

> pngquant-bin@4.0.0 postinstall /var/jenkins_home/workspace/crypto-coaster/node_modules/pngquant-bin
> node lib/install.js

⚠ The `/var/jenkins_home/workspace/crypto-coaster/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
⚠ pngquant pre-build test failed
ℹ compiling from source
✔ pngquant pre-build test passed successfully
✖ Error: pngquant failed to build, make sure that libpng-dev is installed
at Promise.all.then.arr (/var/jenkins_home/workspace/crypto-coaster/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

我已经更新了Docker镜像,尝试了不同版本的Node(7.9.0,8.11.1),并继续遇到相同的错误。

不知道如何解决使 pngquant-bin在此版本上工作。

任何帮助将不胜感激。

最佳答案

根据此问题https://github.com/imagemin/pngquant-bin/issues/78
我使用此dockerfile创建一个新镜像,并且工作正常。

FROM jenkins/jenkins:lts
USER root
RUN apt-get update && apt-get install -y gcc make libpng-dev
USER jenkins

关于docker - Jenkins构建无法安装pngquant,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49703784/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com