How to create customize jenkins image in docker

0 votes

Hi Guys,

I want to create one cluster of Jenkins. So I am trying to implement this task on Docker. Can anyone help me, how can I create Jenkins image?

May 18, 2020 in Docker by akhtar
• 38,210 points

1 answer to this question.

0 votes


You can pull Jenkins image from docker hub. But if you want to create a customize image of Jenkins, you can use Dockerfile. Here I have attached one Dockerfile for your reference.

FROM centos:7
RUN  yum install wget -y
RUN yum install java-11-openjdk.x86_64 -y
RUN wget -O /etc/yum.repos.d/jenkins.repo
RUN rpm --import
RUN yum install jenkins -y
RUN yum install /usr/sbin/service -y
RUN yum install sudo -y
RUN echo "jenkins ALL=(ALL) NOPASWD: ALL" >> /etc/sudoers
RUN yum install iptables -y
ENTRYPOINT service jenkins restart && bash

Hope this will help.

answered May 18, 2020 by MD
• 95,320 points

Related Questions In Docker

0 votes
1 answer

How to store data in external drive with Docker Postgres:9.3 image?

Apparently, the problem would be in your ...READ MORE

answered Jul 12, 2018 in Docker by Kalgi
• 2,680 points
0 votes
1 answer
0 votes
1 answer

How to create a container and run images in docker?

Look for what all images you have ...READ MORE

answered Feb 23, 2019 in Docker by Kalgi
• 52,370 points
0 votes
1 answer

how do I create an image from a tar archive in docker?

You can use docker load command inorder to get ...READ MORE

answered Jul 2, 2019 in Docker by Sirajul
• 59,090 points
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,140 points
0 votes
1 answer

How to create our own docker image?

Hi@akhtar, There are two ways to create docker ...READ MORE

answered Mar 11, 2020 in Docker by MD
• 95,320 points
0 votes
1 answer

How to create a secret in docker?

Hi@akhtar, In Docker, a secret is any blob ...READ MORE

answered Aug 17, 2020 in Docker by MD
• 95,320 points