Error response from daemon: No such container: <container_id>

I’m trying to run: “docker exec <container_id> / <container_name> /bin/bash”. I’m sure that my container ID is correct but it always says: “Error response from daemon: Container <container_id> is not running”, so naturally, I run <container_name> but immediately Docker Desktop says “Exited (1)”, and ends the container. I don’t know how to fix this but also when I go into my container > logs it displays lots of module errors. It might just be the package (Powershell-Empire that is now 4 years old), or it could be that I haven’t installed all dependencies, but shutting down the container as soon as I click “Run” seems strange. Any response will be much appreciated, and if you are responding, please stay active so if more errors follow, I’ll hopefully know what to do. Thanks in advance.

You can not exec into a container that is stopped. An exited container is a stopped container…

A container is nothing else that an isolated process - if it stops, the container stops. You need to fix your application, so the process inside the container can keep running.

But when I run the container, it excites immediately and I can’t exec.

That was clear from your first post. Please re-read my last post.

This is not a docker problem. It is an issue of the application you run in a container. Fix your application, create a new image from the fixed application, then it will work.