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,170 points
1,289 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,060 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,530 points
1,706 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,560 points
3,083 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 20,108 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
• 58,990 points
1,302 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,100 points
1,039 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,060 points
8,685 views
+4 votes
19 answers