Docker multistaged builds
- Refer Here for the game of life multi staged build
- Now lets try to build spring-petclinic
- To build spring pet clinic we need maven and the output will be a jar file Refer Here for the Dockerfile
Other Dockerfile Instructions
- ONBUILD: This instruction adds to the image a trigger to be executed at later time when the image is used as the base image for another build
- STOPSIGNAL: The STOPSIGNAL instruction sets the system call signal that will be sent to the container to exit.
- HEALTHCHECK: This instruction tells how to test a container to check if it is still working
HEALTHCHECK --interval=5m --timeout=5s CMD curl -f http://localhost:8080 || exit 1
- WORKDIR: WORKDIR sets the default home directory.
- USER: instruction will set the user. default user will be root. Before using USER instruction user should be created.
- Using Docker Hub to Store Docker Images
- Using ACR (Azure Container Registry) to Store Docker images
- Using ECR (Elastic Container Registry) to store docker images
- Docker Volumes
- Docker Networking
- Basic Concepts of Docker Swarm