jenkinsci / docker

Docker official jenkins repo
https://hub.docker.com/r/jenkins/jenkins
MIT License
6.64k stars 4.51k forks source link

Preinstalling plugins not work #675

Closed dedpnd closed 6 years ago

dedpnd commented 6 years ago

Hello. I'm trying to install plugins and build an image but I get this error.

Docker version 18.03.0-ce, build 0520e24 Image id: 3936442a1372

docker file:

FROM jenkins/jenkins:lts
RUN /usr/local/bin/install-plugins.sh docker-slaves github-branch-source:1.8

Outtput:

root@****:~/dockerimages# docker build -t my .
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM jenkins/jenkins:lts
 ---> 3936442a1372
Step 2/2 : RUN /usr/local/bin/install-plugins.sh docker-slaves github-branch-source:1.8
 ---> Running in 29bc0322c239
Creating initial locks...
Analyzing war...
Registering preinstalled plugins...
Using version-specific update center: https://updates.jenkins.io/2.107...
Downloading plugins...
Downloading plugin: docker-slaves from https://updates.jenkins.io/2.107/latest/docker-slaves.hpi
Downloading plugin: github-branch-source from https://updates.jenkins.io/download/plugins/github-branch-source/1.8/github-branch-source.hpi
Downloaded file is not a valid ZIP: /usr/share/jenkins/ref/plugins/github-branch-source.jpi
Downloaded file is not a valid ZIP: /usr/share/jenkins/ref/plugins/docker-slaves.jpi

WAR bundled plugins:

Installed plugins:
[/usr/share/jenkins/ref/plugins/docker-slaves.jpi]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
docker-slaves:
[/usr/share/jenkins/ref/plugins/github-branch-source.jpi]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
github-branch-source:
Some plugins failed to download! Download integrity: github-branch-source
Download integrity: docker-slaves
The command '/bin/sh -c /usr/local/bin/install-plugins.sh docker-slaves github-branch-source:1.8' returned a non-zero code: 1
carlossg commented 6 years ago

works fine here you must be behind a proxy that corrupts it or a temporary error

dedpnd commented 6 years ago

Thank you for the answer. I tried the same on another server and it works there. Unfortunately, I didn't understand what the reason is because I don't use a proxy.

var23rav commented 5 years ago

Try with plugins.sh instead of install-plugins.sh, plugins.sh works for me. RUN /usr/local/bin/plugins.sh /usr/share/jenkins/ref/plugins.txt