- A port inside a container belongs to the container's own network; it appears on the server after publishing with
-p server_port:container_port. -e NAME=valuesets a container's environment at creation;docker exec … envanddocker inspect --formatshow what the process got.- The port and the environment change only by re-creating the container, and the restart policy also with
docker update --restart. --restartdecides whether a container comes back after a process crash and after a docker service restart;unless-stoppedremembers a manualdocker stop.curlto port 8080 was refused because nginx listened on port 80 insidesite, and no port was published on the server.
Step 8 of 8 · summary · 2 min
Summary
Found an inaccuracy? Report an error in the lesson