nowfound

AI · February 13, 2025

DA

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…

In plain words

Dockershrink is an AI tool that automatically optimizes Dockerfiles to reduce Docker image sizes. It uses GPT-4o to apply techniques like multistage builds, lightweight base images, dependency removal, and stack-specific optimizations—shrinking images from gigabytes to megabytes. Currently supporting Node.js projects, it can run locally and offers more targeted optimization than general-purpose language models or code assistants. The tool is designed for developers managing backend applications and personal projects who want to reduce image storage and deployment sizes.

written from the facts on this page · September 2026

From the sources

In the maker’s words, at launch

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!

Does a similar job

all alternatives →
  • BB
    Building better base images2025 · github.com · ▲38

    This project addresses the inefficiencies of traditional Dockerfile-based container builds where each customization layer creates storage bloat through duplicate dependencies from repeated apt-get install commands, network inefficiency from redundant package downloads across different images, and slow iteration cycles requiring full rebuilds of all previous steps. Our solution enables building minimal base images from scratch using debootstrap that precisely include only required components in the initial build, while allowing creation of specialized variants (Java, Kafka, etc.) from these…

  • DP
  • DockerDiet — Docker Image OptimizerMay 2026 · docker-diet.vercel.app · ▲2

    Paste your Dockerfile. Get an optimized one back in seconds.

  • DD
  • Container DietNov 2025 · k1lgor.github.io · ▲105

    Slim down your Docker images with AI-powered sass. 🐳💅

  • Dock: Developer Optimization Content Kit2025 · ▲135

    AI-powered tool to boost your app's visibility and downloads

More ai this month

the category →
  • I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.

    AI · 18d ago · simedw.com

  • Astute585

    Automate your B2B brand going viral, with new media creators

    AI · 19d ago · company-app.joinastute.com

  • Grok Bot547

    AI teammates that you can give real work to

    AI · 26d ago · x.ai

  • Hey HN, Henry from Cactus here! We previously released Cactus Needle, a 14MB agentic LLM for tool call, device use, and structured extraction for phones, wearables, smart homes, small robots and microcontrollers. We got really great feedback here, and have now incorporated the suggestions to release Needle 2. The whole model is a single 14MB binary that runs a full session in 28MB of RAM; 45m parameters at 2bit compression. Needle hits 500 tokens/sec decode speed on a Raspberry Pi 5, sits between 400-1,500 tokens/sec on VR devices like Meta Quest 3S and Apple Vision Pro, and ranges…

    AI · 27d ago · cactuscompute.com

  • Monid475

    One wallet, every paid tool your agent needs

    AI · 7d ago · monid.ai

  • Turn website visitors into qualified pipeline

    AI · 20d ago · clarasdr.ai

Launched alongside, February 2025

the whole month →
  • Beautiful screen recordings with instant shareable links

    Growth · 2025 · screen.studio

  • Tana1,666

    Put your notes to work with voice and AI

    AI · 2025 · tana.inc

  • IG

    I was at FB/Meta from late 2013 to early 2023, mostly working in the compiler/runtime spaces. I got hit in the spring 2023 layoff wave. I immediately started making games in my newfound free time (a lifelong interest, and I even worked in AA(A?) back ca. ~2000), and in October 2023 I stumbled upon the idea of a roguelike pachinko/plinko game inspired by Luck Be A Landlord. Things snowballed quickly, I started talking to publishers, then worked like crazy through all of 2024, almost the hardest I've ever worked in my career, and launched the game in December 2024. It's sold…

    Work · 2025

  • Tanka1,410

    AI Messenger with smart reply & long term memory for teams

    AI · 2025 · tanka.ai

  • Tool Finder1,327

    Your shortcut to better software

    AI · 2025 · toolfinder.com

  • IB

    i wanted to change the habit of reaching for my phone in the morning and doomscrolling away an hour so i built an app to help me. now i have to literally touch grass before accessing my most distracting apps the app is built in swiftui, uses the screen time apis provided by apple and google vision to recognise grass or not i'd love to get your thoughts on the concept.

    Life & fun · 2025 · touchgrass.now