{"id":13586995,"url":"https://github.com/vicanso/diving-rs","last_synced_at":"2025-04-12T01:31:24.816Z","repository":{"id":142129027,"uuid":"588898280","full_name":"vicanso/diving-rs","owner":"vicanso","description":"Exploring each layer in a docker image, it's fast and simple","archived":false,"fork":false,"pushed_at":"2025-04-11T13:06:18.000Z","size":1111,"stargazers_count":63,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-11T14:42:50.317Z","etag":null,"topics":["dive","diving","docker","docker-image","oci"],"latest_commit_sha":null,"homepage":"https://diving.npmtrend.com/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vicanso.png","metadata":{"files":{"readme":"README-zh.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-14T12:05:52.000Z","updated_at":"2025-04-11T13:06:22.000Z","dependencies_parsed_at":"2023-12-21T14:24:39.761Z","dependency_job_id":"459cf576-9ccc-4477-b308-70a4bf7798fc","html_url":"https://github.com/vicanso/diving-rs","commit_stats":null,"previous_names":[],"tags_count":62,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicanso%2Fdiving-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicanso%2Fdiving-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicanso%2Fdiving-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicanso%2Fdiving-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vicanso","download_url":"https://codeload.github.com/vicanso/diving-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248504248,"owners_count":21115139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dive","diving","docker","docker-image","oci"],"created_at":"2024-08-01T15:05:57.361Z","updated_at":"2025-04-12T01:31:24.446Z","avatar_url":"https://github.com/vicanso.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# diving-rs\n\n用于展示docker镜像的每一层文件列表，它更快更简单，使用rust语言开发。它支持两种模式：命令行（默认模式）以及web模式，无需依赖任何东西，包括docker客户端。\n\n`diving-rs`支持多个平台，包括：linux，windows，macos，可以在[release page](https://github.com/vicanso/diving-rs/releases)下载获取。\n\n需要注意：由于镜像分层数据需要从镜像源下载，如docker hub，下载时长需要较长时间，如果超时则再次尝试即可，建议下载程序在本机执行。而对于私有化部署的镜像源，则可将diving的镜像部署运行在可访问镜像源的机器即可。\n\n## config\n\n默认配置文件为`~/.diving/config.yml`，其配置选项如下：\n\n- `layer_path`: 分层数据缓存的目录，默认为`~/.diving/layers`\n- `layer_ttl`: 分层数据缓存的有效期, 默认为`90d`，如果90天未再访问则该layer被清除\n\n## terminal\n\n镜像数据支持三种数据源模式，具体形式如下：\n\n- `registry` 简写的形式为docker registry，私有或其它的registry则使用完整地址\n- `docker` 基于本地安装了docker客户端的形式\n- `file` 基于本地导出的tar包\n\n```bash\ndiving redis:alpine\n\ndiving quay.io/prometheus/node-exporter\n\ndiving docker://redis:alpine\n\ndiving file:///tmp/redis.tar\n\nCI=true diving redis:alpine\n```\n\n- `Current Layer Contents` 仅显示当前层的所有文件\n- `Press 1` 仅显示当前`修改或删除` 的文件\n- `Press 2` 仅显示当前层大于1MB的文件\n- `Press Esc or 0` 重置显示模式 \n\n![](./assets/diving-terminal.gif)\n\n## web\n\n```bash\ndocker run -d --restart=always \\\n  -p 7001:7001 \\\n  -v $PWD/diving:/home/rust/.diving \\\n  --name diving \\\n  vicanso/diving\n```\n\n需要注意，镜像非使用root运行，因此挂载的目录需要添加对应的读写权限，否则会启动失败。\n\n在浏览器中打开`http://127.0.0.1:7001/`即可。\n\n![](./assets/diving-web.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvicanso%2Fdiving-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvicanso%2Fdiving-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvicanso%2Fdiving-rs/lists"}