The --rm flag in the docker run command automatically removes the container when it exits. This is useful for running temporary containers that you don't need to keep after they have finished executing.
Here’s an example of how to use it:
docker run --rm alpine:latest echo "Hello, World!"
In this example, the container will run the command echo "Hello, World!" and will be removed immediately after it finishes executing.
