How to generate a docker with the desired plugins installed

Hello, I had a docker file to generate a docker image with the desired plugins installed. That docker file was using script. But after I downloaded the latest jenkins docker image, it has stoped working and gives me the following error: has been removed, please switch to jenkins-plugin-cli
But I have not been able to see how to run the jenkins cli during docker build. Could anybody provide a small dockerfile example so I can build my docker with the desired plugins?

My current dockerfile is the follwoing:

FROM jenkins/jenkins:lts-jdk11
LABEL maintainer=""
ENV JENKINS_PASS my_password
ENV JAVA_OPTS -Djenkins.install.runSetupWizard=true
RUN /usr/local/bin/ bitbucket-build-status-notifier atlassian-jira-software-cloud docker-plugin docker-workflow blueocean

Thank you very much.

The Jenkins documentation for installing Jenkins with Docker includes a snippet like the following example Dockerfile:

FROM jenkins/jenkins:2.346.3-jdk11
RUN jenkins-plugin-cli --plugins "blueocean:1.25.6 docker-workflow:1.29"

More details are available at:

The Jenkins 2.346.2 upgrade guide also notes that has been replaced.

1 Like