Bump go.uber.org/atomic from 1.9.0 to 1.11.0 (#597)
Bumps go.uber.org/atomic from 1.9.0 to 1.11.0.
updated-dependencies:
- dependency-name: go.uber.org/atomic dependency-version: 1.11.0 dependency-type: direct:production update-type: version-update:semver-minor …
Signed-off-by: dependabot[bot] support@github.com Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
dive
A tool for exploring a Docker image, layer contents, and discovering ways to shrink the size of your Docker/OCI image.
To analyze a Docker image simply run dive with an image tag/id/digest:
or you can dive with Docker directly:
or if you want to build your image then jump straight into analyzing it:
Building on macOS (supporting only the Docker container engine):
Additionally you can run this in your CI pipeline to ensure you’re keeping wasted space to a minimum (this skips the UI):
This is beta quality! Feel free to submit an issue if you want a new feature or find a bug :)
Basic Features
Show Docker image contents broken down by layer
As 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.
Indicate what’s changed in each layer
Files 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.
Estimate “image efficiency”
The 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.
Quick build/analysis cycles
You can build a Docker image and do an immediate analysis with one command:
dive build -t some-tag .You only need to replace your
docker buildcommand with the samedive buildcommand.CI Integration
Analyze an image and get a pass/fail result based on the image efficiency and wasted space. Simply set
CI=truein the environment when invoking any valid dive command.Multiple Image Sources and Container Engines Supported
With the
--sourceoption, you can select where to fetch the container image from:or
With valid
sourceoptions as such:docker: Docker engine (the default option)docker-archive: A Docker Tar Archive from diskpodman: Podman engine (linux only)Installation
Ubuntu/Debian
Using debs:
Using snap:
RHEL/Centos
Arch Linux
Available in the extra repository and can be installed via pacman:
Mac
If you use Homebrew:
If you use MacPorts:
Or download the latest Darwin build from the releases page.
Windows
If you use Chocolatey
If you use scoop
If you use winget:
Or download the latest Windows build from the releases page.
Go tools Requires Go version 1.10 or higher.
Note: installing in this way you will not see a proper version when running
dive -v.Nix/NixOS
On NixOS:
On non-NixOS (Linux, Mac)
X-CMD
x-cmd is a toolbox for Posix Shell, offering a lightweight package manager built using shell and awk.
Docker
When running you’ll need to include the Docker socket file:
Docker for Windows (showing PowerShell compatible line breaks; collapse to a single line for Command Prompt compatibility)
Note: depending on the version of docker you are running locally you may need to specify the docker API version as an environment variable:
or if you are running with a docker image:
if 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:
CI Integration
When running dive with the environment variable
CI=truethen the dive UI will be bypassed and will instead analyze your docker image, giving it a pass/fail indication via return code. Currently there are three metrics supported via a.dive-cifile that you can put at the root of your repo:You can override the CI config path with the
--ci-configoption.KeyBindings
UI Configuration
No configuration is necessary, however, you can create a config file and override values:
dive will search for configs in the following locations:
$XDG_CONFIG_HOME/dive/*.yaml$XDG_CONFIG_DIRS/dive/*.yaml~/.config/dive/*.yaml~/.dive.yaml.ymlcan be used instead of.yamlif desired.