DevOps Classroomnotes 16/Apr/2023

Multi Stage Docker build

  • Multi staged build is used to build the code and copy necessary files into the final stage which will be your image
  • Refer Here for official docs

Scenario – 1: Java Spring petclinic

  • To build this application we need
    • jdk17
    • maven
    • git
  • Manual steps:
git clone https://github.com/spring-projects/spring-petclinic.git
cd spring-petclinic 
mvn package
# a file gets created in target/spring-petclinic-*.jar
  • To run this application we need jdk 17
  • Refer Here for the changes done to create spring petclinic as multistage build

Scenario -2 Game of life

Pushing images to Registries

Docker Hub

  • Public Registry: Docker Hub Refer Here
  • Create a public Repository
  • Repository will be in the form of <username>/<repo-name>:<tag>
  • After building the image tag the image to new naming format
docker image tag spc:3.0.0 shaikhajaibrahim/qtspringpetclinic:3.0.0


* if this image has to be default also tag with latest (optional)

docker image tag spc:3.0.0 shaikhajaibrahim/qtspringpetclinic:latest


* login into docker hub from cli

docker login


* lets push the images


Private Registries

  • There are many applciations for hosting private registries
    • AWS: ECR (Elastic container registry)
    • Azure: ACR (Azure Container Registry)
    • Jfrog

AWS ECR

  • Create an ECR Repository



  • view push commands
  • install and configure aws cli Refer Here
  • follow as shown in class

Azure ACR

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

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

Please turn AdBlock off
Customized Social Media Icons from Acurax Digital Marketing Agency
Exit mobile version
%%footer%%