How do I reduce Spring Boot's docker image size?
With my current Dockerfile configuration for a barebones spring app (straight from start.spring.io) with dependencies like web, redis, postgres, security, mail sender, etc, the size of the image is at ~350mb and I was told this was pretty large for a barebones application.
Here's my dockerfile
how can I optimise it?
6 Replies
β
This post has been reserved for your question.
Hey @Milk Packet! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
Medium
How to reduce the size of a Docker image using dive
Reducing the overall image size is key to building and launching Docker images as quickly as possible. The smaller the image size, the lessβ¦
Medium
Reduce the size of the Docker Image
To effectively reduce the size of your Docker images, you can implement several best practices and optimization techniques
π€
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
maybe you are trying to do a bit too much in one container? Usually we want applications to be small. We then create several as needed, each fulfilling a separate purpose.
π€
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.