Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 384 Bytes

File metadata and controls

11 lines (7 loc) · 384 Bytes

Remove Container When It Exists

By default, Docker doesn't remove containers when they exit, this can lead storage getting full. To remove a container as soon as it exits, we can pass --rm argument in docker run command.

Usage

docker run --rm ubuntu echo "Hello Docker"

Source: Docker Docs