In this repository you will find the source code for the blog posts:
- Dockerfile: Google Distroless based image
docker build -t spring-demo-distroless .
- Dockerfile-debug: Google Distroless based image with a shell for debugging
docker build -t spring-demo-distroless-debug -f Dockerfile-debug .
- Dockerfile-jdk: bellsoft/liberica-openjre-alpine:17 based image that contains only a JRE for a smaller image.
docker build -t spring-demo-jre -f Dockerfile-jdk .
To build the image with buildpacks:
./gradlew bootBuildImage
See the image size of the images build:
docker images | grep spring-demo