If a container fails to respond in Docker with the error: “a prune operation is already running” then by the end of this tutorial, you will know exactly how to resolve it!
What causes the above issue?
When a Docker container fails to respond or run in Docker, this problem may appear. This can be caused for any number of reasons, related to configuration or update related issues with the container.
1. Firstly, locate the containers that are not responding:
docker inspect %CONTAINER ID%
Please note: The “inspect” command will not return anything if everything is running as it should be.
2. Once we’ve identified the %CONTAINER ID% not responding, look for the PID that corresponds to it by using the ps aux tool:
ps -aux | grep %CONTAINER ID%
Please replace %CONTAINER ID% with the ID in question.
3. We can then kill the process by using the below command:
kill -9 %PID%
Please replace %PID% with the process ID accordingly in order to kill the process.
4. Restart Docker by running the below command:
systemctl restart docker
After following the above steps and then restarting the Docker service, your container should start back up without any issues. Looking for a Linux VPS to run Docker containers on? Consider RackNerd’s hosting solutions below.