Skip to content
AiProductsHunt AiProductsHunt

Container Diet

Slim down your Docker images with AI-powered sass. ๐Ÿณ๐Ÿ’…

Visit website
Screenshot of Container Diet

About Container Diet

Stop shipping bloated containers! Container Diet is a CLI tool that analyzes your Docker images and Dockerfiles to provide actionable, context-aware optimization advice. It uses AI to detect unnecessary packages, security risks, and bad practicesโ€”all while delivering feedback in a "sassy dietician" persona that makes optimization fun.

Reviews 9

Your rating

Thanks! Your review is posted.

Sign in to rate and review Container Diet.

  • Wiley Lubowitz 9 months ago

    Hey hunters! ๐Ÿ‘‹ Since the initial launch of Container Diet, the CLI has gone through a serious evolution. Here's everything that shipped since v0.1.0: ๐Ÿ› ๏ธ --auto-fix โ€” The killer feature Stop reading advice and start applying it. Pass --auto-fix and the Container Dietician writes you a complete, optimized Dockerfile.diet on the spot โ€” works even without a source Dockerfile by reverse-engineering your image layers. container-diet analyze --dockerfile Dockerfile --auto-fix # โ†’ Writes Dockerfile.diet with all fixes applied ๐ŸŒ --remote & --pull-missing Analyze any image, anywhere. --remote pulls straight from a registry without needing a local copy. --pull-missing keeps local-first behavior but auto-pulls if the image isn't found locally. container-diet analyze python:3.11-slim --remote container-diet analyze busybox --pull-missing ๐ŸŽจ Colorful, structured CLI output The terminal output was completely redesigned โ€” Docker-brand cyan/magenta/green color coding, emoji status indicators (โœ–, โœ“, โš ), neon section headers, and a tabular layer-by-layer size breakdown. --help now renders a fully styled, structured template instead of the default Cobra output. ๐Ÿง  Smarter AI analysis (v0.1.1 โ†’ v0.3.0) - Added package manager cache advice โ€” the AI now specifically calls out un-cleared apt, pip, and npm caches that silently bloat your layers - Switched to a structured JSON response (AnalysisResponse) so advice and auto-fix content are cleanly separated and reliably parsed - AI client hardened with a 90-second timeout, context-based request cancellation, and proper type-safe API response parsing โš™๏ธ Analyzer & internals refactored Removed the old CheckDaemon pre-flight check, collapsed layer metadata collection into a single efficient pass, and wired in the pullMissing parameter for clean remote-fallback control โ€” no dead code, no unnecessary os/exec calls. Full CLI feature surface: - ๐Ÿง  GPT-4o Analysis โ€” context-aware roasts _and_ actionable optimization tips - ๐Ÿ› ๏ธ --auto-fix โ€” generates a ready-to-use Dockerfile.diet with all fixes applied - ๐ŸŒ --remote โ€” analyze any public registry image without a local daemon copy - ๐Ÿ”„ --pull-missing โ€” local-first with automatic remote fallback - ๐Ÿ›ก๏ธ Security Audits โ€” root users, exposed secrets, chmod 777 caught and called out - ๐ŸŽจ Beautiful CLI output โ€” Docker-brand colors, tabular layer analysis, neon section headers - ๐Ÿ“„ --dockerfile โ€” pass your Dockerfile for richer, more targeted AI advice - ๐Ÿค– --model โ€” swap in any OpenAI model (defaults to gpt-4o) The biggest thing I shipped since launch is --auto-fix. I got tired of reading optimization advice and then having to manually apply it โ€” so I made the AI just write the fixed Dockerfile for you. It reverse-engineers your image layers if you don't even have a Dockerfile handy. The CLI output also got a full makeover with colors, emojis, and structured sections so it actually feels good to use in the terminal. Would love to hear what you think โ€” and what you'd want next (TUI mode? CI integration? Drop it in the comments)!" Links: - ๐Ÿ”— Repo: https://github.com/k1lgor/container-diet - ๐ŸŒ Web: https://k1lgor.github.io/container-diet/ - ๐Ÿ“ฆ Install: go install github.com/k1lgor/container-diet/cmd/cli@latest

  • Karley Frami 1 year ago

    Great automation. Congratulations on the launch!

  • Buck Yundt 1 year ago

    Can we not use other AIs for the same? Can Container Diet generate images?

  • Ulises Ankunding 1 year ago

    Lmao I love the subtitle ๐Ÿ˜‚

  • Joaquin Wisozk 1 year ago

    @k1lgor Love this, making Docker optimisation fun is such a clever angle. Curious: does Container Diet just analyze the final image, or can it actually suggest alternative base images / multi-stage setups too? Thatโ€™s where most peopleโ€™s โ€œcontainer caloriesโ€ come from.

  • Toni Kutch 1 year ago

    lol @ "why is this 2GB?" felt. The sassy dietician vibe might actually make me fix stuff instead of shrugging. Love that it's local-only. Curious if it groks multi-stage builds and package manager caches (pip/npm). Tossing it at a chunky image later.

  • Kyleigh Luettgen 1 year ago

    Nice, Was looking for something like that. Will try this.

  • Gaylord Buckridge 1 year ago

    Congratulations on launching Container Diet! AI-driven, context-aware optimization plus security auditing makes it a thoughtful tool for developers looking to streamline their Docker images.

  • Wiley Lubowitz 1 year ago

    Great ideia! Question, how does is this different from asking Claude or Any model directly? Do have a huge set of rules that you consider best practices? Congrats on the launch

Compare