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,230 points
1,231 views

1 answer to this question.

0 votes

Hi@akhtar,

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 https://pkg.jenkins.io/redhat-stable/jenkins.repo
RUN rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
RUN yum install jenkins -y
RUN yum install /usr/sbin/service -y
EXPOSE 8080
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,440 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
2,351 views
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,360 points
1,828 views
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,230 points
7,978 views
+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,090 points
2,467 views
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,440 points
766 views
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,440 points
524 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP