How do -d and -it change docker run behavior?
-d
-it
docker run
Both flags mean exactly the same detached execution mode.
-d runs in the background; -it keeps input open and allocates a pseudo-TTY for interaction.
-d publishes a port; -it assigns a container name.
-d deletes the image; -it converts the container into an image.