jenkins.io icon indicating copy to clipboard operation
jenkins.io copied to clipboard

Docker page - image build fails

Open edp237 opened this issue 4 years ago • 4 comments
trafficstars

Problem with the Docker page, source file

The image build in step 4 for 'On Windows' fails, multiple 'Downloaded file is not a valid ZIP' messages

dockerfile

FROM jenkins/jenkins:2.277.2-lts-jdk11
USER root
RUN apt-get update && apt-get install -y apt-transport-https \
       ca-certificates curl gnupg2 \
       software-properties-common
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
RUN apt-key fingerprint 0EBFCD88
RUN add-apt-repository \
       "deb [arch=amd64] https://download.docker.com/linux/debian \
       $(lsb_release -cs) stable"
RUN apt-get update && apt-get install -y docker-ce-cli
USER jenkins
RUN jenkins-plugin-cli --plugins "blueocean:1.24.6 docker-workflow:1.26"
docker build -t myjenkins-blueocean:1.1 .

[+] Building 317.9s (10/10) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 32B                                                                                0.0s
 => [internal] load .dockerignore                                                                                  0.1s
 => => transferring context: 2B                                                                                    0.0s
 => [internal] load metadata for docker.io/jenkins/jenkins:2.277.2-lts-jdk11                                       1.3s
 => [1/7] FROM docker.io/jenkins/jenkins:2.277.2-lts-jdk11@sha256:4fd7619d5c2de77236634b634e9750a6b6b3c792dff239d  0.0s
 => CACHED [2/7] RUN apt-get update && apt-get install -y apt-transport-https        ca-certificates curl gnupg2   0.0s
 => CACHED [3/7] RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -                       0.0s
 => CACHED [4/7] RUN apt-key fingerprint 0EBFCD88                                                                  0.0s
 => CACHED [5/7] RUN add-apt-repository        "deb [arch=amd64] https://download.docker.com/linux/debian          0.0s
 => CACHED [6/7] RUN apt-get update && apt-get install -y docker-ce-cli                                            0.0s
 => ERROR [7/7] RUN jenkins-plugin-cli --plugins "blueocean:1.24.6 docker-workflow:1.26"                         316.4s
------
 > [7/7] RUN jenkins-plugin-cli --plugins "blueocean:1.24.6 docker-workflow:1.26":
#10 72.42 Downloaded file is not a valid ZIP
#10 93.43 Downloaded file is not a valid ZIP
#10 114.4 Downloaded file is not a valid ZIP
#10 135.4 Downloaded file is not a valid ZIP
#10 240.5 Downloaded file is not a valid ZIP
#10 261.5 Downloaded file is not a valid ZIP
#10 303.5 Downloaded file is not a valid ZIP
#10 303.5 Downloaded file is not a valid ZIP
#10 316.4 Unable to download workflow-support
#10 316.4 Tried downloading plugin-util-api from https://get.jenkins.io/plugins/plugin-util-api/2.1.0/plugin-util-api.hpi
#10 316.4 Tried downloading pipeline-stage-step from https://get.jenkins.io/plugins/pipeline-stage-step/2.5/pipeline-stage-step.hpi
#10 316.4 Tried downloading docker-workflow from https://mirror.gruenehoelle.nl/jenkins/plugins/docker-workflow/1.26/docker-workflow.hpi
#10 316.4 Tried downloading cloudbees-bitbucket-branch-source from https://get.jenkins.io/plugins/cloudbees-bitbucket-branch-source/2.9.8/cloudbees-bitbucket-branch-source.hpi
#10 316.4 Tried downloading pubsub-light from https://mirror.gruenehoelle.nl/jenkins/plugins/pubsub-light/1.14/pubsub-light.hpi
#10 316.4 Downloaded file is not a valid ZIP
#10 316.4 Tried downloading github from https://mirror.gruenehoelle.nl/jenkins/plugins/github/1.33.1/github.hpi
#10 316.4 Tried downloading mailer from https://mirror.gruenehoelle.nl/jenkins/plugins/mailer/1.34/mailer.hpi
#10 316.4 Downloaded file is not a valid ZIP
#10 316.4 Tried downloading git-server from https://get.jenkins.io/plugins/git-server/1.9/git-server.hpi
#10 316.4 Tried downloading blueocean-core-js from https://get.jenkins.io/plugins/blueocean-core-js/1.24.6/blueocean-core-js.hpi
#10 316.4 Tried downloading workflow-multibranch from https://get.jenkins.io/plugins/workflow-multibranch/2.23/workflow-multibranch.hpi
#10 316.4 Tried downloading jquery3-api from https://get.jenkins.io/plugins/jquery3-api/3.6.0-1/jquery3-api.hpi
#10 316.4 Tried downloading blueocean-display-url from https://get.jenkins.io/plugins/blueocean-display-url/2.4.1/blueocean-display-url.hpi
#10 316.4 Tried downloading echarts-api from https://get.jenkins.io/plugins/echarts-api/5.1.0-2/echarts-api.hpi
#10 316.4 Tried downloading matrix-project from https://get.jenkins.io/plugins/matrix-project/1.18/matrix-project.hpi
#10 316.4 Tried downloading snakeyaml-api from https://get.jenkins.io/plugins/snakeyaml-api/1.27.0/snakeyaml-api.hpi
#10 316.4 Tried downloading credentials from https://get.jenkins.io/plugins/credentials/2.3.18/credentials.hpi
#10 316.4 Tried downloading workflow-api from https://get.jenkins.io/plugins/workflow-api/2.42/workflow-api.hpi
#10 316.4 Tried downloading okhttp-api from https://get.jenkins.io/plugins/okhttp-api/3.14.9/okhttp-api.hpi
#10 316.4 Tried downloading github-branch-source from https://get.jenkins.io/plugins/github-branch-source/2.10.2/github-branch-source.hpi
#10 316.4 Tried downloading durable-task from https://get.jenkins.io/plugins/durable-task/1.36/durable-task.hpi
#10 316.4 Downloaded file is not a valid ZIP
#10 316.4 Downloaded file is not a valid ZIP
#10 316.4 Downloaded file is not a valid ZIP
#10 316.4 Downloaded file is not a valid ZIP
------
executor failed running [/bin/sh -c jenkins-plugin-cli --plugins "blueocean:1.24.6 docker-workflow:1.26"]: exit code: 1

edp237 avatar May 06 '21 09:05 edp237

Hello @edp237 , thanks for reporting this issue!

I'm unable to reproduce:

=> [2/7] RUN apt-get update && apt-get install -y apt-transport-https        ca-certificates curl gnupg2        software-properties-common                                                                                                                                                                                                                                                             115.6s
 => [3/7] RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -                                                                                                                                                                                                                                                                                                                     2.0s
 => [4/7] RUN apt-key fingerprint 0EBFCD88                                                                                                                                                                                                                                                                                                                                                                1.5s
 => [5/7] RUN add-apt-repository        "deb [arch=amd64] https://download.docker.com/linux/debian        $(lsb_release -cs) stable"                                                                                                                                                                                                                                                                      1.8s
 => [6/7] RUN apt-get update && apt-get install -y docker-ce-cli                                                                                                                                                                                                                                                                                                                                         14.3s
 => [7/7] RUN jenkins-plugin-cli --plugins "blueocean:1.24.6 docker-workflow:1.26"                                                                                                                                                                                                                                                                                                                       14.5s
 => exporting to image                                                                                                                                                                                                                                                                                                                                                                                    4.4s
 => => exporting layers                                                                                                                                                                                                                                                                                                                                                                                   3.7s
 => => writing image sha256:bc0bb9418bbf55b4d561a8e103d3222f266cb772eca454f8e7055e27702adea2                                                                                                                                                                                                                                                                                                              0.0s
 => => naming to docker.io/library/myjenkins-blueocean:1.1

Can you retry and let us know the result?

It feels like a download mirror issue, and I'm interested in digging a bit more, as a member of the jenkins-infra team.

dduportal avatar May 06 '21 10:05 dduportal

I removed all containers and images, and did a rerun. The problem with the 'Downloaded file is not a valid ZIP' is not solved, unfortunately.

edp237 avatar May 06 '21 10:05 edp237

Docker version 20.10.5, build 55c4c88

edp237 avatar May 06 '21 11:05 edp237

I'm unable to duplicate the issue from my location in the western United States. My mirror is https://mirror.xmission.com/jenkins/

Could you share the results from https://get.jenkins.io/plugins/git-client/3.7.1/git-client.hpi?mirrorlist ?

Mine looks like this:

screencapture-get-jenkins-io-plugins-git-client-3-7-1-git-client-hpi-2021-05-09-22_10_05

MarkEWaite avatar May 09 '21 20:05 MarkEWaite

Closing as:

  • this issue is > 1 year old and no other feedback from reporter
  • unable to reproduce.

Please feel free to reopen it if you still have the issue (with details of course)

dduportal avatar Oct 18 '22 11:10 dduportal