You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I should start by saying I am new to Docker and it is most likely something I am doing wrong rather than an issue with the script!
I have systemctl start/stop working, but enabled services do not restart when the container restarts. I see from the documentation that I need to set the CMD attribute in order for this to work.
…I made a commit, then ran a new container from that image. However, the container will not start. When I check the log, it shows:
{"log":"/bin/sh: 1: [/usr/bin/systemctl]: not found\n","stream":"stderr","time":"2022-04-20T19:47:44.178390159Z"}
I can confirm that /usr/bin/systemctl does exist in the original container, so I presume it should exist in the new one created from the image. Though I'm not sure how I can check this as I can't start the container.
Having run docker inspect, I can see the CMD attribute is set as follows:
I wonder if something has gone wrong here as it's showing '-c' as a value, when I think that should have just been a flag passed to the commit command? Though perhaps I'm barking up the wrong tree…
Any ideas what I might be doing wrong? Thanks
The text was updated successfully, but these errors were encountered:
I should start by saying I am new to Docker and it is most likely something I am doing wrong rather than an issue with the script!
I have systemctl start/stop working, but enabled services do not restart when the container restarts. I see from the documentation that I need to set the CMD attribute in order for this to work.
Using the code provided in the docs…
…I made a commit, then ran a new container from that image. However, the container will not start. When I check the log, it shows:
{"log":"/bin/sh: 1: [/usr/bin/systemctl]: not found\n","stream":"stderr","time":"2022-04-20T19:47:44.178390159Z"}
I can confirm that /usr/bin/systemctl does exist in the original container, so I presume it should exist in the new one created from the image. Though I'm not sure how I can check this as I can't start the container.
Having run docker inspect, I can see the CMD attribute is set as follows:
I wonder if something has gone wrong here as it's showing '-c' as a value, when I think that should have just been a flag passed to the commit command? Though perhaps I'm barking up the wrong tree…
Any ideas what I might be doing wrong? Thanks
The text was updated successfully, but these errors were encountered: