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
5,865 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
3,517 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,840 points
5,267 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 34,135 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,230 points
3,794 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 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
20,000 views
+15 votes
19 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,229,558 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