💀

【Docker】Unstoppable Container -> do this

2023/02/05に公開

If you are still receiving the error message "Error response from daemon: Cannot kill container: ...: permission denied" even after following the steps to resolve the issue with permissions, it may mean that there is a deeper issue with the Docker installation or configuration.

In this case, you can try restarting the Docker daemon to see if that resolves the issue:

sudo service docker restart

If restarting the Docker daemon does not resolve the issue, you may need to reinstall Docker to fix any underlying issues with the installation or configuration. To do this, you can follow these steps:

Remove the existing Docker installation:

sudo apt-get remove docker docker-engine docker.io

Remove any remaining Docker files:

sudo rm -rf /var/lib/docker

Install the latest version of Docker:

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

These steps should reinstall Docker and resolve any underlying issues that may be preventing you from stopping the Docker container.

Discussion