Docker Community Forums

Share and learn in the Docker community.

Can't stop and delete containers

Hello Docker community,

I have two docker containers which are linked. The first one is a mariadb database and the other one is a MediaWiki instance. I don’t need these two anymore, that’s why I would like to stop and remove them.

My Problem is now, that I can’t do that. I tried a lot of things already:

  • Executing docker update --restart=no "containers" . But it keeps restarting after I stop the container with docker container stop "container" .

  • Tried to remove the images with no joy as they are in use by the containers (even if I kill the container and then quickly try to delete the image). Quite obvious, I know. But I tried

  • Restarted the entire Docker service with systemctl restart docker .

  • I even restarted my entire Server.

All of these with no positive result. I’m kinda frustated.

I got two more containers running very well. (pyload and netdata). No problems at all with them.

My System runs under OpenMediaVault (which is based on Debian).
The system is running under Kernel 4.19

As I’m new in the Docker world, please tell me what you need to help me :slight_smile:
If you need any log or something like that, please let me know and I’ll upload it.

Thank you in advance!
Mac

Can nobody help me with that issue?

You can forcefully terminate containers by sending a KILL signal via:
docker rm -f container_name

This will instantly terminate the container, whether it is running or not.

Already tried that. The container restarts itself anyway with another ID.

Can you share the dockerfile or the docker-compose file to set these containers up

Is it this what you are looking for?
https://hub.docker.com/_/mediawiki

I’ll try to do a system prune to remove everything. I’ve invested to much time in this cr** now.
Thanks anyway for your help…

After you did update --restart=no, can you inspect the container’s restart policy with ```
docker inspect -f “{{ .HostConfig.RestartPolicy }}” container_name

What is the policy now?`