Docker: install-plugins fails when using a plugin list with windows line endings

Created on 22 Jun 2017  路  11Comments  路  Source: jenkinsci/docker

Docker commands that you execute

I'm building a Docker file which contains the following:

FROM jenkins
...
COPY plugins/plugins.txt /var/share/jenkins/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /var/share/jenkins/plugins.txt
...

My plugins file is in this format:

git:3.3.0
git-client:2.4.6
git-server:1.7

Actual result

For every plugin I see output like this:

Failed to download plugin: git or git-plugin

..and the following summary:

Installed plugins:
*:
Some plugins failed to download! Not downloaded: ace-editor
Not downloaded: antisamy-markup-formatter
Not downloaded: credentials-binding
...

Expected outcome

As per your instructions at the following URL I would expect this to install all plugins:
https://github.com/jenkinsci/docker#preinstalling-plugins

Have you tried a non-dockerized Jenkins and get the expected outcome?

N/A

Output of docker version

Client:
 Version:      17.03.1-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Tue Mar 28 00:40:02 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.03.1-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Fri Mar 24 00:00:50 2017
 OS/Arch:      linux/amd64
 Experimental: true

Other relevant information

This is not network related - I have tried multiple different networks
The download URLs appear to be incorrect as manually pasting into browser shows a 404 Not Found (e.g. https://updates.jenkins.io/download/plugins/git-plugin/3.3.0)

Most helpful comment

Hi Carlos,

Yes that did it - thanks!

My shell scripting isn't good enough to submit a pull request with tests, but here's what I added to my Dockerfile:

RUN apt-get update && apt-get install -y dos2unix

...

#fix windows line endings
RUN dos2unix /usr/share/jenkins/plugins.txt && apt-get --purge remove -y dos2unix && rm -rf /var/lib/apt/lists/*

I hope it helps.

Thanks for your quick replies!

All 11 comments

I've also checked the mirror status and all seems to be well:

http://mirrors.jenkins.io/status.html

what's your full log?

Creating initial locks...
Analyzing war...
Using version-specific update center: https://updates.jenkins.io/2.46...
Downloading plugins...
Downloading plugin: git from https://updates.jenkins.io/download/plugins/git/3.3.0/git.hpi
Downloading plugin: git-client from https://updates.jenkins.io/download/plugins/git-client/2.4.6/git-client.hpi
Downloading plugin: git-server from https://updates.jenkins.io/download/plugins/git-server/1.7/git-server.hpi
 > git-server depends on git-client:1.11.0
 > git depends on workflow-scm-step:1.14.2,credentials:2.1.13,git-client:2.4.0,mailer:1.18,matrix-project:1.7.1,promoted-builds:2.27;resolution:=optional,scm-api:2.1.0,ssh-credentials:1.13,token-macro:1.12.1;resolution:=optional,parameterized-trigger:2.4;resolution:=optional
Downloading plugin: workflow-scm-step from https://updates.jenkins.io/2.46/latest/workflow-scm-step.hpi
Downloading plugin: credentials from https://updates.jenkins.io/2.46/latest/credentials.hpi
Downloading plugin: mailer from https://updates.jenkins.io/2.46/latest/mailer.hpi
Skipping optional dependency promoted-builds
Downloading plugin: matrix-project from https://updates.jenkins.io/2.46/latest/matrix-project.hpi
Downloading plugin: scm-api from https://updates.jenkins.io/2.46/latest/scm-api.hpi
Skipping optional dependency token-macro
Downloading plugin: ssh-credentials from https://updates.jenkins.io/2.46/latest/ssh-credentials.hpi
Skipping optional dependency parameterized-trigger
 > git-client depends on credentials:2.1.13,ssh-credentials:1.13,structs:1.6
Downloading plugin: structs from https://updates.jenkins.io/2.46/latest/structs.hpi
 > workflow-scm-step depends on workflow-step-api:1.15
Downloading plugin: workflow-step-api from https://updates.jenkins.io/2.46/latest/workflow-step-api.hpi
 > ssh-credentials depends on credentials:2.1.0
 > mailer depends on display-url-api:1.0
Downloading plugin: display-url-api from https://updates.jenkins.io/2.46/latest/display-url-api.hpi
 > matrix-project depends on junit:1.20,script-security:1.13
Downloading plugin: junit from https://updates.jenkins.io/2.46/latest/junit.hpi
Downloading plugin: script-security from https://updates.jenkins.io/2.46/latest/script-security.hpi
 > credentials depends on structs:1.7
 > workflow-step-api depends on structs:1.5
 > junit depends on structs:1.2

Thanks for the quick response.

Log below:
```Sending build context to Docker daemon 13.82 kB
Step 1/13 : FROM jenkins
---> df5bba7c222b
Step 2/13 : LABEL maintainer "[email protected]"
---> Running in 3ca7aed13c36
---> 1ef03c0587aa
Removing intermediate container 3ca7aed13c36
Step 3/13 : USER root
---> Running in 2c2fdfcdc4df
---> fe094e9a0805
Removing intermediate container 2c2fdfcdc4df
Step 4/13 : RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers
---> Running in 7fc33955ef57
---> b186f1b6c958
Removing intermediate container 7fc33955ef57
Step 5/13 : USER jenkins
---> Running in ebac34e517b8
---> a3d74b70f019
Removing intermediate container ebac34e517b8
Step 6/13 : COPY plugins/plugins.txt /usr/share/jenkins/plugins.txt
---> 1bb02602a276
Removing intermediate container f4c14c9cd4cf
Step 7/13 : RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/plugins.txt || echo "\033[1;91m* \033[1;93m Bad Jenkins! \033[1;92mManually Install
Plugins! \033[1;91m*
\033[0m"
---> Running in d8af144389c0
Creating initial locks...
Analyzing war...
Using version-specific update center: https://updates.jenkins.io/2.46...
Downloading plugins...
/ace-editor.hpigin: ace-editor from https://updates.jenkins.io/download/plugins/ace-editor/1.1
/antisamy-markup-formatter.hpiarkup-formatter from https://updates.jenkins.io/download/plugins/antisamy-markup-formatter/1.5
/antisamy-markup-formatter-plugin.hpiormatter-plugin from https://updates.jenkins.io/download/plugins/antisamy-markup-formatter-plugin/1.5
/authentication-tokens.hpitication-tokens from https://updates.jenkins.io/download/plugins/authentication-tokens/1.3
/ace-editor-plugin.hpie-editor-plugin from https://updates.jenkins.io/download/plugins/ace-editor-plugin/1.1
/bouncycastle-api.hpiouncycastle-api from https://updates.jenkins.io/download/plugins/bouncycastle-api/2.16.1
/branch-api.hpigin: branch-api from https://updates.jenkins.io/download/plugins/branch-api/2.0.10
Failed to download plugin: antisamy-markup-formatter or antisamy-markup-formatter-plugin
/build-timeout.hpi: build-timeout from https://updates.jenkins.io/download/plugins/build-timeout/1.18
Failed to download plugin: ace-editor or ace-editor-plugin
/branch-api-plugin.hpianch-api-plugin from https://updates.jenkins.io/download/plugins/branch-api-plugin/2.0.10
/bouncycastle-api-plugin.hpistle-api-plugin from https://updates.jenkins.io/download/plugins/bouncycastle-api-plugin/2.16.1
/authentication-tokens-plugin.hpin-tokens-plugin from https://updates.jenkins.io/download/plugins/authentication-tokens-plugin/1.3
/cloudbees-folder.hpiloudbees-folder from https://updates.jenkins.io/download/plugins/cloudbees-folder/6.0.4
/credentials.hpiin: credentials from https://updates.jenkins.io/download/plugins/credentials/2.1.14
/credentials-binding.hpientials-binding from https://updates.jenkins.io/download/plugins/credentials-binding/1.12
Failed to download plugin: bouncycastle-api or bouncycastle-api-plugin
/build-timeout-plugin.hpi-timeout-plugin from https://updates.jenkins.io/download/plugins/build-timeout-plugin/1.18
Failed to download plugin: authentication-tokens or authentication-tokens-plugin
/display-url-api.hpidisplay-url-api from https://updates.jenkins.io/download/plugins/display-url-api/2.0
Failed to download plugin: branch-api or branch-api-plugin
/cloudbees-folder-plugin.hpis-folder-plugin from https://updates.jenkins.io/download/plugins/cloudbees-folder-plugin/6.0.4
/docker-commons.hpi docker-commons from https://updates.jenkins.io/download/plugins/docker-commons/1.6
/credentials-binding-plugin.hpi-binding-plugin from https://updates.jenkins.io/download/plugins/credentials-binding-plugin/1.12
/credentials-plugin.hpidentials-plugin from https://updates.jenkins.io/download/plugins/credentials-plugin/2.1.14
Failed to download plugin: build-timeout or build-timeout-plugin
/docker-workflow.hpidocker-workflow from https://updates.jenkins.io/download/plugins/docker-workflow/1.11
Failed to download plugin: cloudbees-folder or cloudbees-folder-plugin
/email-ext.hpiugin: email-ext from https://updates.jenkins.io/download/plugins/email-ext/2.57.2
/durable-task.hpin: durable-task from https://updates.jenkins.io/download/plugins/durable-task/1.14
/display-url-api-plugin.hpi-url-api-plugin from https://updates.jenkins.io/download/plugins/display-url-api-plugin/2.0
Failed to download plugin: credentials-binding or credentials-binding-plugin
Failed to download plugin: credentials or credentials-plugin
/docker-commons-plugin.hpi-commons-plugin from https://updates.jenkins.io/download/plugins/docker-commons-plugin/1.6
Failed to download plugin: docker-commons or docker-commons-plugin
/git.hpiing plugin: git from https://updates.jenkins.io/download/plugins/git/3.3.0
/external-monitor-job.hpinal-monitor-job from https://updates.jenkins.io/download/plugins/external-monitor-job/1.7
/email-ext-plugin.hpimail-ext-plugin from https://updates.jenkins.io/download/plugins/email-ext-plugin/2.57.2
/git-client.hpigin: git-client from https://updates.jenkins.io/download/plugins/git-client/2.4.6
/git-plugin.hpigin: git-plugin from https://updates.jenkins.io/download/plugins/git-plugin/3.3.0
/durable-task-plugin.hpible-task-plugin from https://updates.jenkins.io/download/plugins/durable-task-plugin/1.14
Failed to download plugin: display-url-api or display-url-api-plugin
/docker-workflow-plugin.hpiworkflow-plugin from https://updates.jenkins.io/download/plugins/docker-workflow-plugin/1.11
/git-server.hpigin: git-server from https://updates.jenkins.io/download/plugins/git-server/1.7
/git-userContent.hpigit-userContent from https://updates.jenkins.io/download/plugins/git-userContent/1.4
/git-userContent-plugin.hpirContent-plugin from https://updates.jenkins.io/download/plugins/git-userContent-plugin/1.4
/github.hpi plugin: github from https://updates.jenkins.io/download/plugins/github/1.27.0
Failed to download plugin: git-userContent or git-userContent-plugin
Failed to download plugin: email-ext or email-ext-plugin
/github-api.hpigin: github-api from https://updates.jenkins.io/download/plugins/github-api/1.85.1
/git-client-plugin.hpit-client-plugin from https://updates.jenkins.io/download/plugins/git-client-plugin/2.4.6
/external-monitor-job-plugin.hpiitor-job-plugin from https://updates.jenkins.io/download/plugins/external-monitor-job-plugin/1.7
Failed to download plugin: durable-task or durable-task-plugin
/github-branch-source.hpib-branch-source from https://updates.jenkins.io/download/plugins/github-branch-source/2.0.6
Failed to download plugin: docker-workflow or docker-workflow-plugin
Failed to download plugin: git or git-plugin
/git-server-plugin.hpit-server-plugin from https://updates.jenkins.io/download/plugins/git-server-plugin/1.7
Failed to download plugin: git-server or git-server-plugin
/github-plugin.hpi: github-plugin from https://updates.jenkins.io/download/plugins/github-plugin/1.27.0
/github-api-plugin.hpithub-api-plugin from https://updates.jenkins.io/download/plugins/github-api-plugin/1.85.1
Failed to download plugin: git-client or git-client-plugin
Failed to download plugin: external-monitor-job or external-monitor-job-plugin
/gradle.hpi plugin: gradle from https://updates.jenkins.io/download/plugins/gradle/1.26
/github-organization-folder.hpinization-folder from https://updates.jenkins.io/download/plugins/github-organization-folder/1.6
Failed to download plugin: github or github-plugin
Failed to download plugin: github-api or github-api-plugin
/handlebars.hpigin: handlebars from https://updates.jenkins.io/download/plugins/handlebars/1.1.1
/github-branch-source-plugin.hpih-source-plugin from https://updates.jenkins.io/download/plugins/github-branch-source-plugin/2.0.6
/gradle-plugin.hpi: gradle-plugin from https://updates.jenkins.io/download/plugins/gradle-plugin/1.26
/jackson2-api.hpin: jackson2-api from https://updates.jenkins.io/download/plugins/jackson2-api/2.7.3
/github-organization-folder-plugin.hpin-folder-plugin from https://updates.jenkins.io/download/plugins/github-organization-folder-plugin/1.6
/icon-shim.hpiugin: icon-shim from https://updates.jenkins.io/download/plugins/icon-shim/2.0.3
Failed to download plugin: github-branch-source or github-branch-source-plugin
/jquery-detached.hpijquery-detached from https://updates.jenkins.io/download/plugins/jquery-detached/1.2.1
/handlebars-plugin.hpindlebars-plugin from https://updates.jenkins.io/download/plugins/handlebars-plugin/1.1.1
Failed to download plugin: gradle or gradle-plugin
Failed to download plugin: github-organization-folder or github-organization-folder-plugin
/jackson2-api-plugin.hpison2-api-plugin from https://updates.jenkins.io/download/plugins/jackson2-api-plugin/2.7.3
/junit.hpig plugin: junit from https://updates.jenkins.io/download/plugins/junit/1.20
/icon-shim-plugin.hpicon-shim-plugin from https://updates.jenkins.io/download/plugins/icon-shim-plugin/2.0.3
/ldap.hping plugin: ldap from https://updates.jenkins.io/download/plugins/ldap/1.15
Failed to download plugin: handlebars or handlebars-plugin
Failed to download plugin: jackson2-api or jackson2-api-plugin
/mailer.hpi plugin: mailer from https://updates.jenkins.io/download/plugins/mailer/1.20
Failed to download plugin: icon-shim or icon-shim-plugin
/mapdb-api.hpiugin: mapdb-api from https://updates.jenkins.io/download/plugins/mapdb-api/1.0.9.0
/jquery-detached-plugin.hpidetached-plugin from https://updates.jenkins.io/download/plugins/jquery-detached-plugin/1.2.1
/matrix-auth.hpiin: matrix-auth from https://updates.jenkins.io/download/plugins/matrix-auth/1.6
/junit-plugin.hpin: junit-plugin from https://updates.jenkins.io/download/plugins/junit-plugin/1.20
/matrix-project.hpi matrix-project from https://updates.jenkins.io/download/plugins/matrix-project/1.11
/ldap-plugin.hpiin: ldap-plugin from https://updates.jenkins.io/download/plugins/ldap-plugin/1.15
/momentjs.hpilugin: momentjs from https://updates.jenkins.io/download/plugins/momentjs/1.1.1
Failed to download plugin: ldap or ldap-plugin
/pam-auth.hpilugin: pam-auth from https://updates.jenkins.io/download/plugins/pam-auth/1.3
/mailer-plugin.hpi: mailer-plugin from https://updates.jenkins.io/download/plugins/mailer-plugin/1.20
/mapdb-api-plugin.hpiapdb-api-plugin from https://updates.jenkins.io/download/plugins/mapdb-api-plugin/1.0.9.0
Failed to download plugin: junit or junit-plugin
/matrix-project-plugin.hpi-project-plugin from https://updates.jenkins.io/download/plugins/matrix-project-plugin/1.11
Failed to download plugin: jquery-detached or jquery-detached-plugin
/pipeline-build-step.hpiline-build-step from https://updates.jenkins.io/download/plugins/pipeline-build-step/2.5
/matrix-auth-plugin.hpirix-auth-plugin from https://updates.jenkins.io/download/plugins/matrix-auth-plugin/1.6
/pipeline-github-lib.hpiline-github-lib from https://updates.jenkins.io/download/plugins/pipeline-github-lib/1.0
Failed to download plugin: mailer or mailer-plugin
/pipeline-graph-analysis.hpi-graph-analysis from https://updates.jenkins.io/download/plugins/pipeline-graph-analysis/1.4
/pam-auth-plugin.hpipam-auth-plugin from https://updates.jenkins.io/download/plugins/pam-auth-plugin/1.3
/momentjs-plugin.hpimomentjs-plugin from https://updates.jenkins.io/download/plugins/momentjs-plugin/1.1.1
Failed to download plugin: matrix-auth or matrix-auth-plugin
/pipeline-graph-analysis-plugin.hpianalysis-plugin from https://updates.jenkins.io/download/plugins/pipeline-graph-analysis-plugin/1.4
/pipeline-github-lib-plugin.hpithub-lib-plugin from https://updates.jenkins.io/download/plugins/pipeline-github-lib-plugin/1.0
Failed to download plugin: mapdb-api or mapdb-api-plugin
Failed to download plugin: matrix-project or matrix-project-plugin
/pipeline-input-step.hpiline-input-step from https://updates.jenkins.io/download/plugins/pipeline-input-step/2.7
Failed to download plugin: momentjs or momentjs-plugin
/pipeline-build-step-plugin.hpiild-step-plugin from https://updates.jenkins.io/download/plugins/pipeline-build-step-plugin/2.5
/pipeline-milestone-step.hpi-milestone-step from https://updates.jenkins.io/download/plugins/pipeline-milestone-step/1.3.1
/pipeline-model-api.hpieline-model-api from https://updates.jenkins.io/download/plugins/pipeline-model-api/1.1.6
/pipeline-input-step-plugin.hpiput-step-plugin from https://updates.jenkins.io/download/plugins/pipeline-input-step-plugin/2.7
Failed to download plugin: pipeline-graph-analysis or pipeline-graph-analysis-plugin
Failed to download plugin: pipeline-build-step or pipeline-build-step-plugin
/pipeline-model-declarative-agent.hpiclarative-agent from https://updates.jenkins.io/download/plugins/pipeline-model-declarative-agent/1.1.1
Failed to download plugin: pam-auth or pam-auth-plugin
/pipeline-model-definition.hpiodel-definition from https://updates.jenkins.io/download/plugins/pipeline-model-definition/1.1.6
Failed to download plugin: pipeline-github-lib or pipeline-github-lib-plugin
/pipeline-model-extensions.hpiodel-extensions from https://updates.jenkins.io/download/plugins/pipeline-model-extensions/1.1.6
/pipeline-rest-api.hpipeline-rest-api from https://updates.jenkins.io/download/plugins/pipeline-rest-api/2.8
Failed to download plugin: pipeline-input-step or pipeline-input-step-plugin
/pipeline-model-api-plugin.hpiodel-api-plugin from https://updates.jenkins.io/download/plugins/pipeline-model-api-plugin/1.1.6
/pipeline-model-definition-plugin.hpifinition-plugin from https://updates.jenkins.io/download/plugins/pipeline-model-definition-plugin/1.1.6
/pipeline-stage-step.hpiline-stage-step from https://updates.jenkins.io/download/plugins/pipeline-stage-step/2.2
/pipeline-milestone-step-plugin.hpione-step-plugin from https://updates.jenkins.io/download/plugins/pipeline-milestone-step-plugin/1.3.1
Failed to download plugin: pipeline-milestone-step or pipeline-milestone-step-plugin
/pipeline-stage-tags-metadata.hpie-tags-metadata from https://updates.jenkins.io/download/plugins/pipeline-stage-tags-metadata/1.1.6
/pipeline-model-declarative-agent-plugin.hpive-agent-plugin from https://updates.jenkins.io/download/plugins/pipeline-model-declarative-agent-plugin/1.1.1
/pipeline-rest-api-plugin.hpirest-api-plugin from https://updates.jenkins.io/download/plugins/pipeline-rest-api-plugin/2.8
/pipeline-stage-view.hpiline-stage-view from https://updates.jenkins.io/download/plugins/pipeline-stage-view/2.8
Failed to download plugin: pipeline-model-definition or pipeline-model-definition-plugin
/pipeline-model-extensions-plugin.hpitensions-plugin from https://updates.jenkins.io/download/plugins/pipeline-model-extensions-plugin/1.1.6
/pipeline-stage-tags-metadata-plugin.hpimetadata-plugin from https://updates.jenkins.io/download/plugins/pipeline-stage-tags-metadata-plugin/1.1.6
/pipeline-stage-step-plugin.hpiage-step-plugin from https://updates.jenkins.io/download/plugins/pipeline-stage-step-plugin/2.2
/plain-credentials.hpiain-credentials from https://updates.jenkins.io/download/plugins/plain-credentials/1.4
/resource-disposer.hpisource-disposer from https://updates.jenkins.io/download/plugins/resource-disposer/0.6
Failed to download plugin: pipeline-model-api or pipeline-model-api-plugin
Failed to download plugin: pipeline-rest-api or pipeline-rest-api-plugin
Failed to download plugin: pipeline-model-declarative-agent or pipeline-model-declarative-agent-plugin
/pipeline-stage-view-plugin.hpiage-view-plugin from https://updates.jenkins.io/download/plugins/pipeline-stage-view-plugin/2.8
/ssh-credentials.hpissh-credentials from https://updates.jenkins.io/download/plugins/ssh-credentials/1.13
/script-security.hpiscript-security from https://updates.jenkins.io/download/plugins/script-security/1.29
/scm-api.hpiplugin: scm-api from https://updates.jenkins.io/download/plugins/scm-api/2.1.1
Failed to download plugin: pipeline-model-extensions or pipeline-model-extensions-plugin
/ssh-slaves.hpigin: ssh-slaves from https://updates.jenkins.io/download/plugins/ssh-slaves/1.20
/structs.hpiplugin: structs from https://updates.jenkins.io/download/plugins/structs/1.8
/resource-disposer-plugin.hpidisposer-plugin from https://updates.jenkins.io/download/plugins/resource-disposer-plugin/0.6
Failed to download plugin: pipeline-stage-view or pipeline-stage-view-plugin
Failed to download plugin: pipeline-stage-step or pipeline-stage-step-plugin
/token-macro.hpiin: token-macro from https://updates.jenkins.io/download/plugins/token-macro/2.1
/timestamper.hpiin: timestamper from https://updates.jenkins.io/download/plugins/timestamper/1.8.8
Failed to download plugin: pipeline-stage-tags-metadata or pipeline-stage-tags-metadata-plugin
/ssh-credentials-plugin.hpidentials-plugin from https://updates.jenkins.io/download/plugins/ssh-credentials-plugin/1.13
Failed to download plugin: resource-disposer or resource-disposer-plugin
/scm-api-plugin.hpi scm-api-plugin from https://updates.jenkins.io/download/plugins/scm-api-plugin/2.1.1
/structs-plugin.hpi structs-plugin from https://updates.jenkins.io/download/plugins/structs-plugin/1.8
Failed to download plugin: ssh-credentials or ssh-credentials-plugin
/windows-slaves.hpi windows-slaves from https://updates.jenkins.io/download/plugins/windows-slaves/1.3.1
/plain-credentials-plugin.hpidentials-plugin from https://updates.jenkins.io/download/plugins/plain-credentials-plugin/1.4
Failed to download plugin: structs or structs-plugin
/script-security-plugin.hpisecurity-plugin from https://updates.jenkins.io/download/plugins/script-security-plugin/1.29
/workflow-aggregator.hpiflow-aggregator from https://updates.jenkins.io/download/plugins/workflow-aggregator/2.5
Failed to download plugin: scm-api or scm-api-plugin
/workflow-api.hpin: workflow-api from https://updates.jenkins.io/download/plugins/workflow-api/2.17
Failed to download plugin: script-security or script-security-plugin
/ssh-slaves-plugin.hpih-slaves-plugin from https://updates.jenkins.io/download/plugins/ssh-slaves-plugin/1.20
/token-macro-plugin.hpien-macro-plugin from https://updates.jenkins.io/download/plugins/token-macro-plugin/2.1
/timestamper-plugin.hpiestamper-plugin from https://updates.jenkins.io/download/plugins/timestamper-plugin/1.8.8
Failed to download plugin: plain-credentials or plain-credentials-plugin
Failed to download plugin: timestamper or timestamper-plugin
/workflow-basic-steps.hpilow-basic-steps from https://updates.jenkins.io/download/plugins/workflow-basic-steps/2.5
/windows-slaves-plugin.hpis-slaves-plugin from https://updates.jenkins.io/download/plugins/windows-slaves-plugin/1.3.1
Failed to download plugin: token-macro or token-macro-plugin
/workflow-cps.hpin: workflow-cps from https://updates.jenkins.io/download/plugins/workflow-cps/2.36
/workflow-cps-global-lib.hpi-cps-global-lib from https://updates.jenkins.io/download/plugins/workflow-cps-global-lib/2.8
Failed to download plugin: ssh-slaves or ssh-slaves-plugin
/workflow-api-plugin.hpiflow-api-plugin from https://updates.jenkins.io/download/plugins/workflow-api-plugin/2.17
/workflow-durable-task-step.hpirable-task-step from https://updates.jenkins.io/download/plugins/workflow-durable-task-step/2.12
/workflow-aggregator-plugin.hpigregator-plugin from https://updates.jenkins.io/download/plugins/workflow-aggregator-plugin/2.5
Failed to download plugin: windows-slaves or windows-slaves-plugin
/workflow-basic-steps-plugin.hpiic-steps-plugin from https://updates.jenkins.io/download/plugins/workflow-basic-steps-plugin/2.5
Failed to download plugin: workflow-basic-steps or workflow-basic-steps-plugin
/workflow-job.hpin: workflow-job from https://updates.jenkins.io/download/plugins/workflow-job/2.11
Failed to download plugin: workflow-api or workflow-api-plugin
/workflow-cps-plugin.hpiflow-cps-plugin from https://updates.jenkins.io/download/plugins/workflow-cps-plugin/2.36
/workflow-multibranch.hpilow-multibranch from https://updates.jenkins.io/download/plugins/workflow-multibranch/2.15
Failed to download plugin: workflow-cps or workflow-cps-plugin
/workflow-scm-step.hpirkflow-scm-step from https://updates.jenkins.io/download/plugins/workflow-scm-step/2.4
/workflow-cps-global-lib-plugin.hpiobal-lib-plugin from https://updates.jenkins.io/download/plugins/workflow-cps-global-lib-plugin/2.8
/workflow-step-api.hpirkflow-step-api from https://updates.jenkins.io/download/plugins/workflow-step-api/2.11
Failed to download plugin: workflow-aggregator or workflow-aggregator-plugin
/workflow-durable-task-step-plugin.hpiask-step-plugin from https://updates.jenkins.io/download/plugins/workflow-durable-task-step-plugin/2.12
Failed to download plugin: workflow-durable-task-step or workflow-durable-task-step-plugin
/workflow-scm-step-plugin.hpiscm-step-plugin from https://updates.jenkins.io/download/plugins/workflow-scm-step-plugin/2.4
/workflow-support.hpiorkflow-support from https://updates.jenkins.io/download/plugins/workflow-support/2.14
/workflow-job-plugin.hpiflow-job-plugin from https://updates.jenkins.io/download/plugins/workflow-job-plugin/2.11
/workflow-multibranch-plugin.hpitibranch-plugin from https://updates.jenkins.io/download/plugins/workflow-multibranch-plugin/2.15
Failed to download plugin: workflow-cps-global-lib or workflow-cps-global-lib-plugin
/ws-cleanup.hpigin: ws-cleanup from https://updates.jenkins.io/download/plugins/ws-cleanup/0.33
Failed to download plugin: workflow-scm-step or workflow-scm-step-plugin
/workflow-support-plugin.hpi-support-plugin from https://updates.jenkins.io/download/plugins/workflow-support-plugin/2.14
Failed to download plugin: workflow-job or workflow-job-plugin
/workflow-step-api-plugin.hpistep-api-plugin from https://updates.jenkins.io/download/plugins/workflow-step-api-plugin/2.11
Failed to download plugin: workflow-multibranch or workflow-multibranch-plugin
Failed to download plugin: workflow-support or workflow-support-plugin
/ws-cleanup-plugin.hpi-cleanup-plugin from https://updates.jenkins.io/download/plugins/ws-cleanup-plugin/0.33
Failed to download plugin: workflow-step-api or workflow-step-api-plugin
Failed to download plugin: ws-cleanup or ws-cleanup-plugin

WAR bundled plugins:

Installed plugins:
:
Some plugins failed to download! Not downloaded: antisamy-markup-formatter
Not downloaded: ace-editor
Not downloaded: bouncycastle-api
Not downloaded: authentication-tokens
Not downloaded: branch-api
Not downloaded: build-timeout
Not downloaded: cloudbees-folder
Not downloaded: credentials-binding
Not downloaded: credentials
Not downloaded: docker-commons
Not downloaded: display-url-api
Not downloaded: git-userContent
Not downloaded: email-ext
Not downloaded: durable-task
Not downloaded: docker-workflow
Not downloaded: git
Not downloaded: git-server
Not downloaded: git-client
Not downloaded: external-monitor-job
Not downloaded: github
Not downloaded: github-api
Not downloaded: github-branch-source
Not downloaded: gradle
Not downloaded: github-organization-folder
Not downloaded: handlebars
Not downloaded: jackson2-api
Not downloaded: icon-shim
Not downloaded: ldap
Not downloaded: junit
Not downloaded: jquery-detached
Not downloaded: mailer
Not downloaded: matrix-auth
Not downloaded: mapdb-api
Not downloaded: matrix-project
Not downloaded: momentjs
Not downloaded: pipeline-graph-analysis
Not downloaded: pipeline-build-step
Not downloaded: pam-auth
Not downloaded: pipeline-github-lib
Not downloaded: pipeline-input-step
Not downloaded: pipeline-milestone-step
Not downloaded: pipeline-model-definition
Not downloaded: pipeline-model-api
Not downloaded: pipeline-rest-api
Not downloaded: pipeline-model-declarative-agent
Not downloaded: pipeline-model-extensions
Not downloaded: pipeline-stage-view
Not downloaded: pipeline-stage-step
Not downloaded: pipeline-stage-tags-metadata
Not downloaded: resource-disposer
Not downloaded: ssh-credentials
Not downloaded: structs
Not downloaded: scm-api
Not downloaded: script-security
Not downloaded: plain-credentials
Not downloaded: timestamper
Not downloaded: token-macro
Not downloaded: ssh-slaves
Not downloaded: windows-slaves
Not downloaded: workflow-basic-steps
Not downloaded: workflow-api
Not downloaded: workflow-cps
Not downloaded: workflow-aggregator
Not downloaded: workflow-durable-task-step
Not downloaded: workflow-cps-global-lib
Not downloaded: workflow-scm-step
Not downloaded: workflow-job
Not downloaded: workflow-multibranch
Not downloaded: workflow-support
Not downloaded: workflow-step-api
Not downloaded: ws-cleanup
Bad Jenkins! Manually Install Plugins! *
---> cae9eacd455c
Removing intermediate container d8af144389c0
Step 8/13 : COPY jobs/job1-config.xml /usr/share/jenkins/ref/jobs/job1/config.xml
---> fc199e3abdc2
Removing intermediate container 877551bb697a
Step 9/13 : COPY config/config.xml /usr/share/jenkins/ref/config.xml
---> eb62d6a6173c
Removing intermediate container 8343e1de9524
Step 10/13 : COPY config/hudson.tasks.Maven.xml /usr/share/jenkins/ref/hudson.tasks.Maven.xml
---> e955656f5d4d
Removing intermediate container 17115ba68bde
Step 11/13 : COPY config/basic-security.groovy /usr/share/jenkins/ref/basic-security.groovy
---> 5e4d4719d4ad
Removing intermediate container b3f010b0b62e
Step 12/13 : RUN echo 2.0 > /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state
---> Running in dab5d8a99b45
---> 0b267cd26c5c
Removing intermediate container dab5d8a99b45
Step 13/13 : ENV JAVA_OPTS "-Djenkins.install.runSetupWizard=false -Duser.timezone=Australia/Sydney"
---> Running in 944b7180b3f3
---> f91d382e2e76
Removing intermediate container 944b7180b3f3
Successfully built f91d382e2e76
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have
'-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories. ```

I don't think you are using the latest version of the image, build with docker build --pull ...

No, that doesn't help. I get exactly the same result with --pull

I've just built this successfully on Docker Cloud and on a Mac so the failures are isolated to running build on a Windows machine.

Here's a repo which reproduces the problem on different Windows machines :

https://github.com/danhumphrey/local-jenkins

Here's my docker version info:

Client:
 Version:      17.03.1-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Tue Mar 28 00:40:02 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.03.1-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Fri Mar 24 00:00:50 2017
 OS/Arch:      linux/amd64
 Experimental: true

Do you need any more info to help debug this?

ah, thanks for narrowing it down. Then I think the issue must be with line endings in your plugin.txt. Maybe our script only deals with unix line endings.
Can you convert the plugin.txt to unix line endings and try to confirm?

Hi Carlos,

Yes that did it - thanks!

My shell scripting isn't good enough to submit a pull request with tests, but here's what I added to my Dockerfile:

RUN apt-get update && apt-get install -y dos2unix

...

#fix windows line endings
RUN dos2unix /usr/share/jenkins/plugins.txt && apt-get --purge remove -y dos2unix && rm -rf /var/lib/apt/lists/*

I hope it helps.

Thanks for your quick replies!

FWIW I had the same issue with unsuccessful download of plugins via plugins.txt on Windows. The line ending fix mentioned above worked for me on Windows. I changed the line endings of plugins.txt from CRLF to LF and attempted to run the docker build again which was successful.

As expected this was not an issue on MacOS.

I prefer this solution without install additional packages:

RUN grep -v '^[#|\b]' /usr/share/jenkins/ref/plugins.txt | tr -d '\r' | grep -v '^$' | /usr/local/bin/install-plugins.sh

I think comment and empty line are now managed by latest enhacement, see #505

RUN tr -d '\r' < /usr/share/jenkins/ref/plugins.txt | /usr/local/bin/install-plugins.sh

Fixed in #625

Was this page helpful?
0 / 5 - 0 ratings