How to run jenkins service inside docker container

+1 vote

Hi Guys,

I installed jenkins inside docker container. But I am not able to start jenkins service using systemctl command. How can I start jenkins service?

May 12, 2020 in Docker by akhtar
• 38,260 points
7,404 views

1 answer to this question.

0 votes

Hi@akhtar,

By default systemctl command will not run inside docker container. But you can start your jenkins service by using the below given commands.

$ /etc/rc.d/init.d/jenkins start
$ service jenkins start

Hope this will help you

answered May 12, 2020 by MD
• 95,460 points
When I run first command it shows
No such file or directory
Please help
Hi@Omprakash,

Try with second one. But before that install service software.
I've installed and started the jenkins by this cmd

/etc/rc.d/init.d/jenkins strat

and it shows output this:

jenkins start ok

it does not open any port for webUI

By default, Jenkins works on Port 8080. So try with this. If you exposed your container then try with your VM IP and port no. Or check with the docker ps command.

Related Questions In Docker

0 votes
1 answer

How to run a docker command from inside the container?

You must have come across the /var/run/docker.sock file, ...READ MORE

answered Jun 28, 2018 in Docker by Sophie may
• 10,620 points
4,803 views
0 votes
1 answer

How to run a cron job inside a docker container?

Hii, crond works well with tiny on Alpine RUN apk add --no-cache ...READ MORE

answered May 18, 2020 in Docker by Niroj
• 82,800 points
6,133 views
+4 votes
4 answers

How To Access a Service on Host From a Docker Container?

Adding to kalgi's answer, You can also ...READ MORE

answered Oct 16, 2018 in Docker by lina
• 8,220 points

edited Oct 16, 2018 by lina 36,973 views
0 votes
2 answers

How to execute docker exec commande inside a docker container ?

You need to get inside the container ...READ MORE

answered Aug 13, 2019 in Docker by Sirajul
• 59,190 points
5,790 views
+2 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
7,668 views
0 votes
1 answer

How to run firefox inside docker container?

Hi@akhtar, Generally, if you run firefox inside docker ...READ MORE

answered Apr 16, 2020 in Docker by MD
• 95,460 points
21,707 views
+16 votes
22 answers

How can I run a ‘docker exec’ command inside a docker container?

you can run any command in a ...READ MORE

answered Dec 10, 2018 in Docker by Pramiti
1,241,054 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