Skip to content

shyim/docker-phobia

 
 

Repository files navigation



docker-phobia

analyze Docker images and make them slim



Install

You can install docker-phobia with:

curl -sf https://goblin.run/github.com/remorses/docker-phobia | sh
# goblin.run will build the binary and place it in PATH
# if you have go installed you can also do
go install github.com/remorses/docker-phobia

Usage

docker-phobia
# Use the arrow keys to navigate: ↓ ↑ → ←
# ? Select a Docker image:
#   ▸ node:18-slim
#     postgres:latest

# or pass the image tag as an argument
docker-phobia node:18-slim

Example Output

Every rectangle represents a folder or file in the image. The bigger the rectangle, the more space it takes up.

The different colors represent the different layers in the image. If two rectangles have the same color, they are in the same layer. If the color shade is similar, they are from layers close to each other.

example treemap

How it works

Execute docker-phobia to initiate a Go script that leverages dive internal API for Docker image retrieval and analysis, outputting a JSON file structure with file sizes. Concurrently, it spins up a server on port 8080 and launches docker-phobia.vercel.app, which visualizes the JSON data as a treemap.

About

Analyze Docker images size

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 73.6%
  • Go 23.0%
  • CSS 1.7%
  • JavaScript 1.7%