You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docker ps -a: list all the containers included the killed
run
Run
docker container run ubuntu:xenial /bin/bash: tell Docker which process to run inside container to replace default CMD, but nothing can be shown in the terminal
docker container run -it ubuntu:xenial: interactive mode, connect your terminal to the CT's bash shell
Ctrl-PQ: exist and suspend the container
docker container run --name CT_Name ubuntu:xenial: name of the container
docker container run -it -d ubuntu:xenial: detached mode (executing as daemon in background)
docker container run -it --rm ubuntu:xenial: remove after the execution
docker container run -d -p 80:80 ubuntu:xenial: NAT the port
docker container run -d -P ubuntu:xenial: NAT port of the container to a random port of the host