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
#The NGINX image exposes ports 80 and 443 in the container and the -P option tells Docker to map
98
-
#those ports to ports on the Docker host that are randomly selected from the range between 49153 and 65535.
99
-
docker run -d --name mynginx -p 8080:80 simple-nginx:v1
100
-
101
-
docker port mynginx
102
-
103
-
docker run -d --name mynginx2 --publish-all simple-nginx:v1
104
-
docker port mynginx2
105
-
106
-
107
-
#En este caso, con --rm cuando se para el contenedor se elimina automáticamente
108
-
docker run --rm --name hello-nginx -P simple-nginx:v1
109
-
docker port hello-nginx
110
-
docker ps -a #hello-nginx no está entre los contenedores
111
-
112
-
#Si intentamos eliminar una imagen y hay algún contenedor que la está utilizando no será posible, dará error, incluso si este ya terminó de ejecutarse.
#Si intentamos eliminar una imagen y hay algún contenedor que la está utilizando no será posible, dará error, incluso si este ya terminó de ejecutarse.
0 commit comments