Home » DevOps » Docker Points
October 11, 2022
- Network mode: default bridge mode [not shared with host] , Other: host [network same as host]
- from container to local host, URL to access the host : docker.host.internal
- Docker volumes :
- Annonymous : removed on docker remove
- Docker volume: does not remove but is used by docker internally
- Bind mount: local host path
- Each command in the docker file is the layer, and layers are cached during the build
- The container has name and Image have tags.
- .dockerignore to ignore the current folder file for part of image
- Env variable for container and ARG variable for image build
- Attached mode and detacher mode, -it for the interactive terminal
- Docker compose : depends_upon and stdin_open
- .env_file: to skip the env from git commit
- To accept the input from console. docker run should be executed with -it
- Docker exec command to run the command inside the container from host
- Docker exec <containername >
- Docker compose, we can run the individual container with run command as well
- Docker-compose run <service name>
- Multi-stage build, where one is used for build and the artifact for that is used in another but the number of images is 1.
E-learning Solution Architect | Technical Enthusiastic | LAMP Stack Developer | AWS Cloud Solution Architect (2x) | OCI (5X)
You may also like...