Docker – Is stopping a Docker Container the same as removing a Docker Container

containersdocker

If Docker is "ephemeral", how is stopping a container different than removing a container? When I stop and I start, that doesn't mean I can save information in that container does it? I thought that was what you didn't want to do (save data in the Container.)

Best Answer

If Docker is "ephemeral", how is stopping a container different than removing a container?

Stopped containers are visible via docker ps -a. If containers are started with the --rm option, they'll remove themselves after stopping.

When I stop and I start, that doesn't mean I can save information in that container does it? I thought that was what you didn't want to do (save data in the Container.)

You're absolutely right. State should never be saved inside a container.