Run a container in the background with a name, a port mapping and an env var.
BeginnerProductionRapid-Fire Commands
Answer
docker run -d --name web -p 8080:80 -e APP_ENV=prod nginx:1.27
More on Rapid-Fire Commands
Show only running container names and their images.BeginnerFollow the last 50 lines of logs with timestamps.BeginnerGet a shell in a running container, as root, even if the image sets USER.BeginnerStop and remove every exited container.BeginnerShow which files a container changed relative to its image.BeginnerPrint a container's IP, exit code and restart count in one command.Intermediate