How to get Exit code of forcefully removed docker

Hi All,

I want to understand how can I get Exit code of forcefully removed running docker container.

If you already removed the container, there is no way to get the exit code. If you meant forcfeully stopped like this:

docker stop -s KILL containername

You can get the exitcode

docker container inspect containername --format '{{ .State.ExitCode }}'

But docker ps -a can show that too.