6

I am trying to implement some cicd using GitLab runner,
I am very new to containers and trying to install the zip package in the container,
I was able to install awscli using pip but, I am not able to install the zip package, which is required for my shell script.

Following is the .gitlab-ci.yml file -

stages:
    - build

build:
    image: python:latest
    stage: build
    script:
        - pip install awscli
        - yum install zip
        - bash cicdScript.sh

I'm using the python container, as my script requires awscli,
But also needs the zip package,
I tried the following -

1)

script:
            - pip install awscli
            - yum install zip
            - bash cicdScript.sh

gives -

/bin/bash: line 82: yum: command not found

2)

script:
            - pip install awscli
            - apt-get install zip unzip
            - bash cicdScript.sh

gives -

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
Dev1ce
  • 5,390
  • 17
  • 90
  • 150

1 Answers1

4

Try update and -y

apt-get update
apt-get install -y zip unzip
Prakash Krishna
  • 1,239
  • 6
  • 12