Can't stop or kill a container

I forgot to react, but thanks to @meyay’s post I found it again. I can’t quote it, since you shared the output as an image, but that output actually contains the name of the systemd service that starts the container. The name starts with “docker-container@”

I am not entirely sure, because I don’t use systemd services like this, but after some research:

I think you could do something like this:

systemctl stop "docker-container@elasticsearch_node_1.service"
systemctl stop "docker-container@elasticsearch_node_2.service"
systemctl disable docker-container.service

Or the last line may be

systemctl disable "docker-container@.service"

If you want to find the file that contains this service definition, you should just list all files with the “service” extension and grep for “docker-container”

find /etc/systemd/ -name *.service | grep docker-container
1 Like