2026-01-267- LDIAMOL_4
|
1 min read
chp 4:
- you can use multi-stage docker files, to build, test and start your application and copy files between each stage
- not in this chapter but I was curious if you can have docker watch files for changes then build and looks like
docker composehas a watch option - with multi-stage you don't need your build tools to be in with your app run, so the app run part can be even lighter and quicker
- when you need multiple containers to communicate with each other they do it through a virtual networking that docker manages. the IPs allocated on container creation by docker
docker network create nat- create a docker network, called nat- containers on the same network can reach each other by name by including
--network natto the container run command, nat is the network name - benefits of multi-stage Dockerfiles
- standardization
- performance: layers are cached
- lean: only what is need is in the app