Home

Awesome

DSLIM1

Follow Gitter chat Discord chat

Overview

docker-slim has been used with Node.js, Python, Ruby, Java, Go, Rust, Elixir and PHP (some app types) running on Ubuntu, Debian, CentOS and Alpine Linux.

Active areas of interest:

Current Minification Examples

Node.js application images:

Python application images:

Ruby application images:

Go application images:

Rust application images:

Java application images:

PHP application images:

Haskell application images:

Elixir application images:

.NET application images:

How to use examples

While DockerSlim is capable of more, at the moment, the majority of the examples illustrate the image minification procedure using docker-slim build command in its various modes.

A typical example has a README file describing its purpose and basic usage. Normally, there is also a Makefile with the default target. So, running make or make default from inside of the example folder would execute the example for you end-to-end outputting all the used commands on the way.

Most frequently used make targets:

# All example types
make                             # run example (semi-automatic)
make test-e2e                    # run the acceptance test suite
make clean                       # remove all artifacts created by this example


# 'CLI application' example type
make fat-build                   # build the "fat" version of the image
make fat-run-interactive         # run the CLI app using the "fat" image

make slim-build                  # turn the "fat" image into a "slim" one
make slim-run-interactive        # run the CLI app using the "slim" image

make slim-build-from-dockerfile  # build the "slim" version of the image using the "fat" Dockerfile


# 'Web Service' example type
make fat-build                   # build the "fat" version of the image
make fat-run                     # run the web service using the "fat" image
make fat-run-seccomp             # run the "fat" image using generated seccomp profile
make fat-validate                # send a request to the running web service
make fat-stop                    # stop the running web service

make slim-build                  # turn the "fat" image into a "slim" one
make slim-run                    # run the web service using the "slim" image
make slim-run-seccomp            # run the "slim" image using generated seccomp profile
make slim-validate               # send a request to the running web service
make slim-stop                   # stop the running web service

make slim-build-from-dockerfile  # build the "slim" version of the image using the "fat" Dockerfile

make debug-sidecar               # run a debug sidecar container with an interactive shell


# 'Docker Compose' example type
make fat-build                   # build the "fat" version of the image
make fat-run                     # run the compose file using the "fat" image
make fat-validate                # send a request to the running web service
make fat-stop                    # stop the running web service

make slim-build-compose          # turn the "fat" image into a "slim" one using docker-compose file
make slim-run                    # run the compose file using the "slim" image
make slim-validate               # send a request to the running web service
make slim-stop                   # stop the running web service