FROM ubuntu:latest
RUN apt update && apt-get install openjdk-17-jdk -y && apt-get install maven git -y
RUN git clone https://github.com/spring-projects/spring-framework.git
WORKDIR spring-framework
keypoints
immutable: once build a layer never change and new instruction will create new layer
cached: reusefull layer for multiple images. save disk storage
read-only : all layer in image will be readonly
Ordered: layers will be applicable to Dockerfile order
Layer will be having wirte access when you run image as container
docker run
Docker run will have R/W access
FROM ubuntu:latest
RUN apt update
RUN apt-get install openjdk-17-jdk -y
RUN apt-get install maven -y
RUN apt-get install git -y
RUN git clone https://github.com/spring-projects/spring-petclinic.git
WORKDIR spring-petclinic