How can I install systemctl tool in Docker container

0 votes

Hi,

I tried to use systemctl tool in Docker, But the command to install systemctl tool is not working.

$ yum install systemctl
$ bash:systemctl: No such file

I have the rpm in my container, but still I am getting error.

Thank You 

Feb 5, 2020 in Docker by akhtar
• 38,180 points
6,939 views

1 answer to this question.

0 votes

Hi@akhtar,

In docker container if you want to install any tool, then you have to give the file path. For systemctl tool you can check first which file provides the tool.

Now you can install systemctl using the below command.

$ yum install /usr/bin/systemctl

Hope this will work.

Thank You

answered Feb 5, 2020 by MD
• 95,140 points

Related Questions In Docker

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How do I install phantomjs with node in docker

Here is what you can try. Link for existing ...READ MORE

answered Aug 1, 2018 in Docker by Damon Salvatore
• 5,980 points
2,424 views
+1 vote
0 answers

How can I map a docker location to my Jenkins workspace so that I can use the files in my Jenkins

Hey guys, I was trying to execute few ...READ MORE

Feb 25, 2020 in Docker by dineshkumar
• 130 points
2,997 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,122 views
+5 votes
19 answers
0 votes
1 answer

How can I connect a docker container to two docker networks that I have created?

Hi@akhtar, It's correct that the network argument of ...READ MORE

answered Mar 23, 2020 in Docker by MD
• 95,140 points
910 views