<p>Correct script below:</p>

<pre><code>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
</code></pre>

<p>Was installing the wrong Zip package and then puttin my archive in the wrong folder.</p>

CC BY-SA 4.0
2018-11-12T14:57:25.143Z
2018-11-12T14:57:25.143Z
SebastianG
<p>I'm trying to zip my dist folder and post to it Azure's kudu zipdeploy endpoint but I keep getting this error regardless of the fact that I have installed a zipping package myself.</p>

<p>My docker image: <a href="https://hub.docker.com/r/weltn24/up-docker-node-chrome-headless/tags/" rel="nofollow noreferrer">weltn24/up-docker-node-chrome-headless</a> on tag: chrome-66_node-10.0_yarn-1.6.0</p>

<p>The part that fails in my yml file:</p>

<pre><code>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
</code></pre>

<p>The commands on the 4'th line is failing with zip: command not found.</p>

<docker><gitlab><node.js><cicd>
zip: command not found after installing zip on NODE docker image, even after installing p7zip?
SebastianG
# zip: command not found after installing zip on NODE docker image, even after installing p7zip?

(Asked by: username_0 on 2018-11-12)

I'm trying to zip my dist folder and post to it Azure's kudu zipdeploy endpoint but I keep getting this error regardless of the fact that I have installed a zipping package myself.
My docker image: weltn24/up-docker-node-chrome-headless on tag: chrome-66_node-10.0_yarn-1.6.0
The part that fails in my yml file:
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

The commands on the 4'th line is failing with zip: command not found.

**Tags:** docker, gitlab, node.js, cicd


---

## 1 answers

### Answer by username_0 on 2018-11-12. Score: 1 | Accepted answer

Correct script below:
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

Was installing the wrong Zip package and then puttin my archive in the wrong folder.


---

