Do

Dockershrink – AI Assistant to reduce the size of Docker images

Hacker News

Dockershrink – AI Assistant to reduce the size of Docker images

For the past few months, I've been hacking around a project I call Dockershrink. It automates a simple task: Take a Dockerfile and optimize its code with the goal of reducing the size of the final Docker image. People don't realize that we can apply some very basic techniques to reduce, for eg, a 2GB image down to just ~100MB: - Multistage builds with light-weight base image for final stage - Remove unused dependencies - Optimizations specific to the tech stack And I feel like I've already done this optimization for my personal projects and backend apps at my job(s) a couple of times. The project currently uses GPT-4o (open source so you can run it locally) and only works for Nodejs projects. There are a couple of reasons why I think dockershrink can be better than using just Vanilla LLM or Github Copilot/Cursor: - Image optimization can benefit from a lot of custom prompting, especially when you have insights about specific tech stacks. Describing techniques deeply in the prompt gave better results than simply asking the LLM to "optimize code for bloat reduction". - A RAG approach will be truly beneficial. I plan on giving dockershrink access to up-to-date documentations of Docker, Bash and all programming languages out there. Additionally, it can be given a few suitable chunks of code to enhance the context. - Analysing custom base images: most orgs have their customized base images. Adding context about these can further help Dockershrink make better decisions. Try it out - "brew install dockershrink" Happy to hear your thoughts!

Share card

Actual performance

11points
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: cursor, apps, dock · Missing: mac, agents, macos
89%89% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
78%78% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: open source, io · Missing: https docs, excited, just released
51%51% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: personal, apps, month · Missing: mobile apps, ios, entrepreneurs
48%48% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
47%47% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
15%15% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Wh
Whalebrew – Homebrew, but with Docker images44%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Whalebrew – Homebrew, but with Docker images

Hacker News11
In
Intro to Docker Images and Containers58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Intro to Docker Images and Containers

Hacker News3
Do
Docuum – LRU Eviction of Docker Images50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Docuum – LRU Eviction of Docker Images

Hacker News10
Do
Docker-phobia: Analyze Docker image size with a treemap32%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Docker-phobia: Analyze Docker image size with a treemap

Hacker News91
Do
Docker FastPath: Only Build Your Images Once52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Docker FastPath: Only Build Your Images Once

Hacker News7
Fr
Free tool to reduce the size of images27%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Free tool to reduce the size of images

Hacker News1
Yo
YoDocker – Yo when your docker images built successfully54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

YoDocker – Yo when your docker images built successfully

Hacker News3
Sq
Squeaker: Like Docker, but for Smalltalk Images55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Squeaker: Like Docker, but for Smalltalk Images

Hacker News16
Ho
Homogenius – Packer/unpacker to reduce the size of JSON45%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Homogenius – Packer/unpacker to reduce the size of JSON

Hacker News58
Ho
Homogenius – packing/unpacking to reduce the size of homogenous JSON45%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Homogenius – packing/unpacking to reduce the size of homogenous JSON

Hacker News1