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,260 points
1,581 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,460 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,626 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,350 points
2,219 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
8,658 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,020 points
2,714 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,460 points
976 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,460 points
712 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