-
Notifications
You must be signed in to change notification settings - Fork 711
-
nerdctl purge -f returns the following error:
WARN[0004] failed to remove container error="unknown container status unknown"
I was messing around trying to install portainer-ce before I figured out I needed iptables installed.
I've since been able to delete all previously run containers with nerdctl purge -f except this pesky one.
It's the docker.io/portainer/portainer-ce:lts image that was advised to pull from their_docs with:
docker run -d -p 8000:8000 \ -p 9443:9443 --name portainer \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v portainer_data:/data portainer/portainer-ce:lts
nerdctl ps -a shows it's status as unknown and I can't run it. Maybe there's a
way to overwrite it?
Beta Was this translation helpful? Give feedback.
All reactions
Yeah, it is a bug.
containerd/containerd#11890 - there is a fix pending merge in containerd for it, so, hopefully we should get it with the next patch release.
Unfortunately, there is no cute way to clean the mess right now.
What you can do is kill the shim process for that container then immediately remove it.
Something like, get the shim: ps aux | grep shim | grep XXXCONTAINERIDXXX
Then kill -s KILL XXPROCESSIDXX; nerdctl rm -f XXXCONTAINERIDXXX.
Replies: 2 comments
-
Yeah, it is a bug.
containerd/containerd#11890 - there is a fix pending merge in containerd for it, so, hopefully we should get it with the next patch release.
Unfortunately, there is no cute way to clean the mess right now.
What you can do is kill the shim process for that container then immediately remove it.
Something like, get the shim: ps aux | grep shim | grep XXXCONTAINERIDXXX
Then kill -s KILL XXPROCESSIDXX; nerdctl rm -f XXXCONTAINERIDXXX.
Beta Was this translation helpful? Give feedback.
All reactions
-
oh! three commands in two lines? so cute!😊
thank you!
Beta Was this translation helpful? Give feedback.
All reactions
-
😄 1