DevOps Classroom Series – 06/Nov/2020

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.

Next Steps

  • 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

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Floating Social Media Icons by Acurax Wordpress Designers

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube