$ ./guess_the_languageDevOps
DevOps · easy · #232

What does --rm do here?

docker run --rm alpine echo hi
  1. Removes the alpine image afterwards
  2. Runs the container with a read-only disk
  3. Deletes the container when it exits
  4. Removes any old container with that name
--rm cleans up the container (and its anonymous volumes) once it stops; the image stays in the local cache.
Play DevOps ▸