DevOps Classroom notes 17/Dec/2025

Microservices

  • A monolithic application is broken down into multiple individually runnable services. Each service should handle a functionality
  • Each microservice change should be deployed seperately
  • Containers are best to run individual microservices, Since there are lots of moving parts we need an orchestrator.

optimizations

  • Optimizations refer to
    • size: How to make docker images slim
    • resources: min and max resources
    • security: ensure docker image has no serious security issues

Activity 1:

  • Take the multi stage docker image which we have used for spring petclinic
  • Find out the size

Steps

  • Create an ec2/vm
  • create a spring petclinic image
  • we need to scan this image for security issues

Things to Remember

  • SBOM (Software Bill of Materials)
  • Distroless images
  • Scanners (Trivy)

Distroless spc

  • dockerfile
FROM maven:3-eclipse-temurin-21-alpine AS builder
COPY . /spc
WORKDIR /spc
RUN mvn package


FROM cgr.dev/chainguard/jre:latest
LABEL author=shaikkhajaibrahim
LABEL project=learning
LABEL version=3.3.0
USER nonroot
EXPOSE 8080
COPY --from=builder --chown=nonroot:nonroot /spc/target/spring-petclinic-4.0.0-SNAPSHOT.jar /app/spring-petclinic-4.0.0-SNAPSHOT.jar
WORKDIR /app
CMD ["java", "-jar", "spring-petclinic-4.0.0-SNAPSHOT.jar"]
  • After that scan and generate sbom and scan sbom.
  • Exercise: Do this for dotnet and react application
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
Social Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%