[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-608":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},608,"dive","wagoodman\u002Fdive","wagoodman","A tool for exploring each layer in a docker image","",null,"Go",54261,1980,365,169,0,20,133,393,88,44.89,"MIT License",false,"main",[26,27,28,29,30,31],"cli","docker","docker-image","explorer","inspector","tui","2026-06-12 02:00:16","# dive\n[![GitHub release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frelease\u002Fwagoodman\u002Fdive.svg)](https:\u002F\u002Fgithub.com\u002Fwagoodman\u002Fdive\u002Freleases\u002Flatest)\n[![Validations](https:\u002F\u002Fgithub.com\u002Fwagoodman\u002Fdive\u002Factions\u002Fworkflows\u002Fvalidations.yaml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fwagoodman\u002Fdive\u002Factions\u002Fworkflows\u002Fvalidations.yaml)\n[![Go Report Card](https:\u002F\u002Fgoreportcard.com\u002Fbadge\u002Fgithub.com\u002Fwagoodman\u002Fdive)](https:\u002F\u002Fgoreportcard.com\u002Freport\u002Fgithub.com\u002Fwagoodman\u002Fdive)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT%202.0-blue.svg)](https:\u002F\u002Fgithub.com\u002Fwagoodman\u002Fdive\u002Fblob\u002Fmain\u002FLICENSE)\n[![Donate](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDonate-PayPal-green.svg?style=flat)](https:\u002F\u002Fwww.paypal.me\u002Fwagoodman)\n\n**A tool for exploring a Docker image, layer contents, and discovering ways to shrink the size of your Docker\u002FOCI image.**\n\n\n![Image](.data\u002Fdemo.gif)\n\nTo analyze a Docker image simply run dive with an image tag\u002Fid\u002Fdigest:\n```bash\ndive \u003Cyour-image-tag>\n```\n\nor you can dive with Docker directly:\n```\nalias dive=\"docker run -ti --rm  -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock docker.io\u002Fwagoodman\u002Fdive\"\ndive \u003Cyour-image-tag>\n\n# for example\ndive nginx:latest\n```\n\nor if you want to build your image then jump straight into analyzing it:\n```bash\ndive build -t \u003Csome-tag> .\n```\n\nBuilding on macOS (supporting only the Docker container engine):\n\n```bash\ndocker run --rm -it \\\n      -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock \\\n      -v  \"$(pwd)\":\"$(pwd)\" \\\n      -w \"$(pwd)\" \\\n      -v \"$HOME\u002F.dive.yaml\":\"$HOME\u002F.dive.yaml\" \\\n      docker.io\u002Fwagoodman\u002Fdive:latest build -t \u003Csome-tag> .\n```\n\nAdditionally you can run this in your CI pipeline to ensure you're keeping wasted space to a minimum (this skips the UI):\n```\nCI=true dive \u003Cyour-image>\n```\n\n![Image](.data\u002Fdemo-ci.png)\n\n**This is beta quality!** *Feel free to submit an issue if you want a new feature or find a bug :)*\n\n## Basic Features\n\n**Show Docker image contents broken down by layer**\n\nAs you select a layer on the left, you are shown the contents of that layer combined with all previous layers on the right. Also, you can fully explore the file tree with the arrow keys.\n\n**Indicate what's changed in each layer**\n\nFiles that have changed, been modified, added, or removed are indicated in the file tree. This can be adjusted to show changes for a specific layer, or aggregated changes up to this layer.\n\n**Estimate \"image efficiency\"**\n\nThe lower left pane shows basic layer info and an experimental metric that will guess how much wasted space your image contains. This might be from duplicating files across layers, moving files across layers, or not fully removing files. Both a percentage \"score\" and total wasted file space is provided.\n\n**Quick build\u002Fanalysis cycles**\n\nYou can build a Docker image and do an immediate analysis with one command:\n`dive build -t some-tag .`\n\nYou only need to replace your `docker build` command with the same `dive build`\ncommand.\n\n**CI Integration**\n\nAnalyze an image and get a pass\u002Ffail result based on the image efficiency and wasted space. Simply set `CI=true` in the environment when invoking any valid dive command.\n\n**Multiple Image Sources and Container Engines Supported**\n\nWith the `--source` option, you can select where to fetch the container image from:\n```bash\ndive \u003Cyour-image> --source \u003Csource>\n```\nor\n```bash\ndive \u003Csource>:\u002F\u002F\u003Cyour-image>\n```\n\nWith valid `source` options as such:\n- `docker`: Docker engine (the default option)\n- `docker-archive`: A Docker Tar Archive from disk\n- `podman`: Podman engine (linux only)\n\n## Installation\n\n**Ubuntu\u002FDebian**\n\nUsing debs:\n```bash\nDIVE_VERSION=$(curl -sL \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fwagoodman\u002Fdive\u002Freleases\u002Flatest\" | grep '\"tag_name\":' | sed -E 's\u002F.*\"v([^\"]+)\".*\u002F\\1\u002F')\ncurl -fOL \"https:\u002F\u002Fgithub.com\u002Fwagoodman\u002Fdive\u002Freleases\u002Fdownload\u002Fv${DIVE_VERSION}\u002Fdive_${DIVE_VERSION}_linux_amd64.deb\"\nsudo apt install .\u002Fdive_${DIVE_VERSION}_linux_amd64.deb\n```\n\nUsing snap:\n```bash\nsudo snap install docker\nsudo snap install dive\nsudo snap connect dive:docker-executables docker:docker-executables\nsudo snap connect dive:docker-daemon docker:docker-daemon\n```\n\n> [!CAUTION]\n> The Snap method is not recommended if you installed Docker via `apt-get`, since it might break your existing Docker daemon.\n> \n> See also: https:\u002F\u002Fgithub.com\u002Fwagoodman\u002Fdive\u002Fissues\u002F546\n\n\n**RHEL\u002FCentos**\n```bash\nDIVE_VERSION=$(curl -sL \"https:\u002F\u002Fapi.github.com\u002Frepos\u002Fwagoodman\u002Fdive\u002Freleases\u002Flatest\" | grep '\"tag_name\":' | sed -E 's\u002F.*\"v([^\"]+)\".*\u002F\\1\u002F')\ncurl -fOL \"https:\u002F\u002Fgithub.com\u002Fwagoodman\u002Fdive\u002Freleases\u002Fdownload\u002Fv${DIVE_VERSION}\u002Fdive_${DIVE_VERSION}_linux_amd64.rpm\"\nrpm -i dive_${DIVE_VERSION}_linux_amd64.rpm\n```\n\n**Arch Linux**\n\nAvailable in the [extra repository](https:\u002F\u002Farchlinux.org\u002Fpackages\u002Fextra\u002Fx86_64\u002Fdive\u002F) and can be installed via [pacman](https:\u002F\u002Fwiki.archlinux.org\u002Ftitle\u002FPacman):\n\n```bash\npacman -S dive\n```\n\n**Mac**\n\nIf you use [Homebrew](https:\u002F\u002Fbrew.sh):\n\n```bash\nbrew install dive\n```\n\nIf you use [MacPorts](https:\u002F\u002Fwww.macports.org):\n\n```bash\nsudo port install dive\n```\n\nOr download the latest Darwin build from the [releases page](https:\u002F\u002Fgithub.com\u002Fwagoodman\u002Fdive\u002Freleases\u002Flatest).\n\n**Windows**\n\nIf you use [Chocolatey](https:\u002F\u002Fchocolatey.org)\n\n```powershell\nchoco install dive\n```\n\nIf you use [scoop](https:\u002F\u002Fscoop.sh\u002F)\n\n```powershell\nscoop install main\u002Fdive\n```\n\nIf you use [winget](https:\u002F\u002Flearn.microsoft.com\u002Fen-gb\u002Fwindows\u002Fpackage-manager\u002F):\n\n```powershell\nwinget install --id wagoodman.dive\n```\n\nOr download the latest Windows build from the [releases page](https:\u002F\u002Fgithub.com\u002Fwagoodman\u002Fdive\u002Freleases\u002Flatest).\n\n**Go tools**\nRequires Go version 1.10 or higher.\n\n```bash\ngo install github.com\u002Fwagoodman\u002Fdive@latest\n```\n*Note*: installing in this way you will not see a proper version when running `dive -v`.\n\n**Nix\u002FNixOS**\n\nOn NixOS:\n```bash\nnix-env -iA nixos.dive\n```\nOn non-NixOS (Linux, Mac)\n```bash\nnix-env -iA nixpkgs.dive\n```\n\n**X-CMD**\n\n[x-cmd](https:\u002F\u002Fwww.x-cmd.com\u002F) is a **toolbox for Posix Shell**, offering a lightweight package manager built using shell and awk.\n```sh\nx env use dive\n```\n\n**Docker**\n```bash\ndocker pull docker.io\u002Fwagoodman\u002Fdive\n# or alternatively\ndocker pull ghcr.io\u002Fwagoodman\u002Fdive\n```\n\nWhen running you'll need to include the Docker socket file:\n```bash\ndocker run --rm -it \\\n    -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock \\\n    docker.io\u002Fwagoodman\u002Fdive:latest \u003Cdive arguments...>\n```\n\nDocker for Windows (showing PowerShell compatible line breaks; collapse to a single line for Command Prompt compatibility)\n```bash\ndocker run --rm -it `\n    -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock `\n    docker.io\u002Fwagoodman\u002Fdive:latest \u003Cdive arguments...>\n```\n\n**Note:** depending on the version of docker you are running locally you may need to specify the docker API version as an environment variable:\n```bash\n   DOCKER_API_VERSION=1.37 dive ...\n```\nor if you are running with a docker image:\n```bash\ndocker run --rm -it \\\n    -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock \\\n    -e DOCKER_API_VERSION=1.37 \\\n    docker.io\u002Fwagoodman\u002Fdive:latest \u003Cdive arguments...>\n```\nif you are using an alternative runtime (Colima etc) then you may need to specify the docker host as an environment variable in order to pull local images:\n```bash\n   export DOCKER_HOST=$(docker context inspect -f '{{ .Endpoints.docker.Host }}')\n```\n\n## CI Integration\n\nWhen running dive with the environment variable `CI=true` then the dive UI will be bypassed and will instead analyze your docker image, giving it a pass\u002Ffail indication via return code. Currently there are three metrics supported via a `.dive-ci` file that you can put at the root of your repo:\n```\nrules:\n  # If the efficiency is measured below X%, mark as failed.\n  # Expressed as a ratio between 0-1.\n  lowestEfficiency: 0.95\n\n  # If the amount of wasted space is at least X or larger than X, mark as failed.\n  # Expressed in B, KB, MB, and GB.\n  highestWastedBytes: 20MB\n\n  # If the amount of wasted space makes up for X% or more of the image, mark as failed.\n  # Note: the base image layer is NOT included in the total image size.\n  # Expressed as a ratio between 0-1; fails if the threshold is met or crossed.\n  highestUserWastedPercent: 0.20\n```\nYou can override the CI config path with the `--ci-config` option.\n\n## KeyBindings\n\nKey Binding                                | Description\n-------------------------------------------|---------------------------------------------------------\n\u003Ckbd>Ctrl + C\u003C\u002Fkbd> or \u003Ckbd>Q\u003C\u002Fkbd>        | Exit\n\u003Ckbd>Tab\u003C\u002Fkbd>                             | Switch between the layer and filetree views\n\u003Ckbd>Ctrl + F\u003C\u002Fkbd>                        | Filter files\n\u003Ckbd>ESC\u003C\u002Fkbd>                             | Close filter files\n\u003Ckbd>PageUp\u003C\u002Fkbd> or \u003Ckbd>U\u003C\u002Fkbd>          | Scroll up a page\n\u003Ckbd>PageDown\u003C\u002Fkbd> or \u003Ckbd>D\u003C\u002Fkbd>        | Scroll down a page\n\u003Ckbd>Up\u003C\u002Fkbd> or \u003Ckbd>K\u003C\u002Fkbd>              | Move up one line within a page\n\u003Ckbd>Down\u003C\u002Fkbd> or \u003Ckbd>J\u003C\u002Fkbd>            | Move down one line within a page\n\u003Ckbd>Ctrl + A\u003C\u002Fkbd>                        | Layer view: see aggregated image modifications\n\u003Ckbd>Ctrl + L\u003C\u002Fkbd>                        | Layer view: see current layer modifications\n\u003Ckbd>Space\u003C\u002Fkbd>                           | Filetree view: collapse\u002Funcollapse a directory\n\u003Ckbd>Ctrl + Space\u003C\u002Fkbd>                    | Filetree view: collapse\u002Funcollapse all directories\n\u003Ckbd>Ctrl + A\u003C\u002Fkbd>                        | Filetree view: show\u002Fhide added files\n\u003Ckbd>Ctrl + R\u003C\u002Fkbd>                        | Filetree view: show\u002Fhide removed files\n\u003Ckbd>Ctrl + M\u003C\u002Fkbd>                        | Filetree view: show\u002Fhide modified files\n\u003Ckbd>Ctrl + U\u003C\u002Fkbd>                        | Filetree view: show\u002Fhide unmodified files\n\u003Ckbd>Ctrl + B\u003C\u002Fkbd>                        | Filetree view: show\u002Fhide file attributes\n\u003Ckbd>PageUp\u003C\u002Fkbd> or \u003Ckbd>U\u003C\u002Fkbd>          | Filetree view: scroll up a page\n\u003Ckbd>PageDown\u003C\u002Fkbd> or \u003Ckbd>D\u003C\u002Fkbd>        | Filetree view: scroll down a page\n\n## UI Configuration\n\nNo configuration is necessary, however, you can create a config file and override values:\n```yaml\n# supported options are \"docker\" and \"podman\"\ncontainer-engine: docker\n# continue with analysis even if there are errors parsing the image archive\nignore-errors: false\nlog:\n  enabled: true\n  path: .\u002Fdive.log\n  level: info\n\n# Note: you can specify multiple bindings by separating values with a comma.\n# Note: UI hinting is derived from the first binding\nkeybinding:\n  # Global bindings\n  quit: ctrl+c\n  toggle-view: tab\n  filter-files: ctrl+f, ctrl+slash\n  close-filter-files: esc\n  up: up,k\n  down: down,j\n  left: left,h\n  right: right,l\n\n  # Layer view specific bindings\n  compare-all: ctrl+a\n  compare-layer: ctrl+l\n\n  # File view specific bindings\n  toggle-collapse-dir: space\n  toggle-collapse-all-dir: ctrl+space\n  toggle-added-files: ctrl+a\n  toggle-removed-files: ctrl+r\n  toggle-modified-files: ctrl+m\n  toggle-unmodified-files: ctrl+u\n  toggle-filetree-attributes: ctrl+b\n  page-up: pgup,u\n  page-down: pgdn,d\n\ndiff:\n  # You can change the default files shown in the filetree (right pane). All diff types are shown by default.\n  hide:\n    - added\n    - removed\n    - modified\n    - unmodified\n\nfiletree:\n  # The default directory-collapse state\n  collapse-dir: false\n\n  # The percentage of screen width the filetree should take on the screen (must be >0 and \u003C1)\n  pane-width: 0.5\n\n  # Show the file attributes next to the filetree\n  show-attributes: true\n\nlayer:\n  # Enable showing all changes from this layer and every previous layer\n  show-aggregated-changes: false\n\n```\n\ndive will search for configs in the following locations:\n- `$XDG_CONFIG_HOME\u002Fdive\u002F*.yaml`\n- `$XDG_CONFIG_DIRS\u002Fdive\u002F*.yaml`\n- `~\u002F.config\u002Fdive\u002F*.yaml`\n- `~\u002F.dive.yaml`\n\n`.yml` can be used instead of `.yaml` if desired.\n","dive 是一个用于探索 Docker 镜像每一层内容的工具。它可以帮助用户深入了解镜像结构，发现减小镜像体积的方法。该工具采用 Go 语言编写，具备命令行界面（CLI）和文本用户界面（TUI），能够展示镜像各层的具体内容及变化情况，并估算“镜像效率”，指出潜在的空间浪费。适用于需要优化 Docker 镜像大小、提高构建效率或进行持续集成（CI）检查的场景。",2,"2026-06-11 02:38:03","top_all"]