gpt4 book ai didi

docker - GitLab 管道 : zip: command not found after installing zip on docker image?

转载 作者:行者123 更新时间:2023-12-01 01:43:52 25 4
gpt4 key购买 nike

我正在尝试压缩我的 dist 文件夹并将 Azure 的 kudu zipdeploy 端点发布到它,但我一直收到此错误,无论我自己安装了一个压缩包。

我的 docker 镜像:weltn24/up-docker-node-chrome-headless
在标签上:chrome-66_node-10.0_yarn-1.6.0
我的 yml 文件中失败的部分:

build:
stage: build
script:
- apt-get install p7zip p7zip-full
- yarn install
- ./node_modules/@angular/cli/bin/ng build --prod
- cd dist/AngularTemplate; zip -r ../dist.zip *; cd ..; cd..
artifacts:
paths:
- dist.zip

第 4 行的命令失败并显示 zip: command not found。

最佳答案

正确的脚本如下:

build:
stage: build
script:
- apt-get install zip unzip
- yarn install
- ./node_modules/@angular/cli/bin/ng build --prod
- cd dist/AngularTemplate; zip -r ../../dist.zip *; cd ..; cd..
artifacts:
paths:
- dist.zip

正在安装错误的 Zip 包,然后将我的存档放在错误的文件夹中。

关于docker - GitLab 管道 : zip: command not found after installing zip on docker image?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53262011/

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