Auto-Remove on Exit (--rm)
DK · Run Optionssyntax
docker run --rm <image>example
docker run --rm -it python:3.12 python -c 'print(2**100)'
docker run --rm alpine:3.19 cat /etc/os-releaseoutput
1267650600228229401496703205376Note Automatically removes the container and its anonymous volumes when it exits. Perfect for one-off commands and throwaway shells. Cannot be combined with --restart.