An interactive container can be converted to an daemon container using ^P^Q shortcut
Exec command does not overwrite the entrypoint command executed by the container
Options -d: Run in detached/ background mode (—detach) -p 80:80: 1st port is the host port and the 2nd one is the container port (—publish) -it: Run container in interactive mode and spawn a pseudo terminal (—interactive —tty) -a: Attach the container (Start again) (—attach)
--rm: Delete the container once it is exited (—remove) --name: Assign an name to the docker container -e: Used if the container allows environment variables to be set (—env)
--net: Connect container to a specific interface (—network) --net-alias: Assign a alternative hostname for container (—network-alias) --link: Link container together
-v: Create a volume and bind mount (—volume) -w: Working directory inside container (—workdir)