LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

docker-slim

optimize and reduce Docker image sizes

TLDR

Analyze and slim an image
$ docker-slim build [image]
copy
Profile an image
$ docker-slim profile [image]
copy
Lint a Dockerfile
$ docker-slim lint [Dockerfile]
copy
Generate Dockerfile from image
$ docker-slim xray [image]
copy
Slim with HTTP probes
$ docker-slim build --http-probe [image]
copy
Slim keeping shell access
$ docker-slim build --include-shell [image]
copy

SYNOPSIS

docker-slim command [options] [image]

DESCRIPTION

docker-slim (also known as SlimToolkit) analyzes and optimizes Docker images, reducing size significantly while maintaining functionality. Uses static and dynamic analysis. The tool works by executing the container, monitoring which files and dependencies are actually used, then creating a minimal image containing only those components. Can reduce image sizes by up to 30x while preserving application functionality.

PARAMETERS

--http-probe

Enable HTTP probing.
--include-shell
Include shell in slimmed image.
--target string
Target output image name.
--expose port
Expose additional ports.

SUBCOMMANDS

build

Analyze and create optimized image.
profile
Analyze image without building.
xray
Inspect image internals.
lint
Lint Dockerfile.
version
Show version info.

INSTALL

brew install docker-slim
copy
nix profile install nixpkgs#docker-slim
copy

SEE ALSO

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid