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 in Docker by akhtar
• 10,150 points
678 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 by MD
• 22,060 points

Related Questions In Docker

0 votes
1 answer
+2 votes
12 answers
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,540 points
1,345 views
0 votes
1 answer
0 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
• 57,530 points
534 views
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 in Docker by MD
• 22,060 points
108 views
0 votes
1 answer

How to install packages in a Docker container?

Hi@akhtar, To install packages in a docker container, ...READ MORE

answered Apr 15 in Docker by MD
• 22,060 points
116 views