docker
environment variables
- add environment variables to run command with
-eargument.
docker run -e APP_COLOR=green simple-webapp-color
dockerfile entrypoint and cmd
- entrypoint is used when you want to pass additional arguments
ENTRYPOINT ["sleep"] - cmd is used to pass argument when you have entrypoint
ENTRYPOINT ["sleep"] CMD ["5"] - can override entrypoint with
--entrypointargument when running image
network
nonecontainer cannot reach outside and cannot be reached complete isolationhostcontainer attached to host network no network isolationbridgedocker creates internal network for attaching containers- on host interface created with
docker0name
- on host interface created with
- list networks with
docker network ls - docker creates network namespace for each container