Ani*_*aje 6 linux command-line-interface gitlab docker
我正在尝试使用 GitLab runner 实现一些 CICD,
我对容器非常陌生,并尝试在容器中安装 zip 包,
我能够使用 pip 安装 awscli,但是,我无法安装 zip 包,这是我的 shell 脚本需要。
以下是 .gitlab-ci.yml 文件 -
stages:
- build
build:
image: python:latest
stage: build
script:
- pip install awscli
- yum install zip
- bash cicdScript.sh
Run Code Online (Sandbox Code Playgroud)
我正在使用 python 容器,因为我的脚本需要 awscli,
但还需要 zip 包,
我尝试了以下操作 -
1)
script:
- pip install awscli
- yum install zip
- bash cicdScript.sh
Run Code Online (Sandbox Code Playgroud)
给出 -
/bin/bash: line 82: yum: command not found
Run Code Online (Sandbox Code Playgroud)
2)
script:
- pip install awscli
- apt-get install zip unzip
- bash cicdScript.sh
Run Code Online (Sandbox Code Playgroud)
给出 -
Reading package lists...
Building dependency tree...
Reading state information...
Package zip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'zip' has no installation candidate
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3761 次 |
最近记录: |