GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - slimtoolkit/examples: Minified application examples with different languages and stacks for DockerSlim

BranchesTags
Open more actions menu

Latest commit

 

History

234 Commits
234 Commits

Folders and files

NameName
Last commit message
Last commit date
3rdparty
3rdparty
 
 
assets/images
assets/images
 
 
aws_node_express_lambda
aws_node_express_lambda
 
 
distroless
distroless
 
 
dotnet_alpine
dotnet_alpine
 
 
dotnet_aspnetcore_ubuntu
dotnet_aspnetcore_ubuntu
 
 
dotnet_debian
dotnet_debian
 
 
dotnet_ubuntu
dotnet_ubuntu
 
 
elixir_phx_standard
elixir_phx_standard
 
 
golang_alpine
golang_alpine
 
 
golang_centos
golang_centos
 
 
golang_gin_standard
golang_gin_standard
 
 
golang_standard
golang_standard
 
 
golang_ubuntu
golang_ubuntu
 
 
hack
hack
 
 
haskell_scotty_standard
haskell_scotty_standard
 
 
http_probe_cmd_file
http_probe_cmd_file
 
 
http_probe_swagger
http_probe_swagger
 
 
http_probe_swagger_http2_https
http_probe_swagger_http2_https
 
 
http_probe_swagger_http2_plain
http_probe_swagger_http2_plain
 
 
image_edit_basic
image_edit_basic
 
 
java_corretto
java_corretto
 
 
java_standard
java_standard
 
 
java_ubuntu_ppa_broken
java_ubuntu_ppa_broken
 
 
kubernetes-deployment-simple
kubernetes-deployment-simple
 
 
node17_express_yarn_standard
node17_express_yarn_standard
 
 
node_alpine
node_alpine
 
 
node_compose
node_compose
 
 
node_jessie_broken
node_jessie_broken
 
 
node_nest_app
node_nest_app
 
 
node_redis_compose
node_redis_compose
 
 
node_ubuntu
node_ubuntu
 
 
node_ubuntu_focal
node_ubuntu_focal
 
 
php7_builtin_web_server
php7_builtin_web_server
 
 
php7_fpm_fastcgi
php7_fpm_fastcgi
 
 
php7_fpm_nginx
php7_fpm_nginx
 
 
python2_flask_alpine
python2_flask_alpine
 
 
python2_flask_centos7_broken
python2_flask_centos7_broken
 
 
python2_flask_standard
python2_flask_standard
 
 
python2_flask_ubuntu14_broken
python2_flask_ubuntu14_broken
 
 
python_centos7_py27_standard_broken
python_centos7_py27_standard_broken
 
 
python_gunicorn_ubuntu_broken
python_gunicorn_ubuntu_broken
 
 
python_standard_shell
python_standard_shell
 
 
python_ubuntu_16.04_user_broken
python_ubuntu_16.04_user_broken
 
 
python_ubuntu_18.04_user
python_ubuntu_18.04_user
 
 
python_ubuntu_18_py27_from_dockerfile
python_ubuntu_18_py27_from_dockerfile
 
 
ruby2_rails5_alpine
ruby2_rails5_alpine
 
 
ruby2_rails5_alpine_puma
ruby2_rails5_alpine_puma
 
 
ruby2_rails5_alpine_puma_sh
ruby2_rails5_alpine_puma_sh
 
 
ruby2_rails5_alpine_unicorn_rails
ruby2_rails5_alpine_unicorn_rails
 
 
ruby2_rails5_standard
ruby2_rails5_standard
 
 
ruby2_rails5_standard_puma
ruby2_rails5_standard_puma
 
 
ruby2_sinatra_alpine
ruby2_sinatra_alpine
 
 
ruby2_sinatra_ubuntu
ruby2_sinatra_ubuntu
 
 
rust_standard
rust_standard
 
 
vuejs-compose
vuejs-compose
 
 
.gitignore
.gitignore
 
 
.gitpod.yml
.gitpod.yml
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
TODO.md
TODO.md
 
 

Repository files navigation

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:

  • Complex Python, Ruby and PHP examples with the popular application servers and Nginx or Apache.
  • Python, Node.js, Ruby and PHP applications packaged in CentOS-based images.
  • Examples with fat container images with multiple components/applications/services.
  • Examples with the most popular process supervisors / init tools.

Current Minification Examples

Node.js application images:

  • from ubuntu:14.04 - 432MB => 14MB (minified by 30.85X)
  • from debian:jessie - 406MB => 25.1MB (minified by 16.21X)
  • from node:alpine - 66.7MB => 34.7MB (minified by 1.92X)
  • from node:distroless - 72.7MB => 39.7MB (minified by 1.83X)

Python application images:

  • from ubuntu:14.04 - 438MB => 16.8MB (minified by 25.99X)
  • from python:2.7-alpine - 84.3MB => 23.1MB (minified by 3.65X)
  • from python:2.7.15 - 916MB => 27.5MB (minified by 33.29X)
  • from centos:7 - 647MB => 23MB (minified by 28.57X)
  • from centos/python-27-centos7 - 700MB => 24MB (minified by 29.01X)
  • from python2.7:distroless - 60.7MB => 18.3MB (minified by 3.32X)

Ruby application images:

  • from ubuntu:14.04 - 433MB => 13.8MB (minified by 31.31X)
  • from ruby:2.2-alpine - 319MB => 27MB (minified by 11.88X)
  • from ruby:2.5.3 - 978MB => 30MB (minified by 32.74X)

Go application images:

  • from golang:latest - 700MB => 1.56MB (minified by 448.76X)
  • from ubuntu:14.04 - 531MB => 1.87MB (minified by 284.10X)
  • from golang:alpine - 258MB => 1.56MB (minified by 165.61X)
  • from centos:7 - 615MB => 1.87MB (minified by 329.14X)

Rust application images:

  • from rust:1.31 - 2GB => 14MB (minified by 147.16X)

Java application images:

  • from ubuntu:14.04 - 743.6 MB => 100.3 MB

PHP application images:

  • from php:7.0-cli - 368MB => 26.6MB (minified by 13.85X)

Haskell application images:

  • (Scotty service) from haskell:8 - 2.09GB => 16.6MB (minified by 125.32X)
  • (Scotty service) from haskell:7 - 1.5GB => 21MB (minified by 71X)

Elixir application images:

  • (Phoenix service) from elixir:1.6 - 1.1GB => 37MB (minified by 29.25X)

.NET application images:

  • from mcr.microsoft.com/dotnet/runtime-deps:5.0-alpine-amd64 - 31MB => 28MB (minified by 1.11X)
  • from mcr.microsoft.com/dotnet/runtime-deps:5.0-buster-slim-amd64 - 132MB => 32MB (minified by 4.11X)
  • from mcr.microsoft.com/dotnet/runtime-deps:5.0-focal-amd64 - 140MB => 32MB (minified by 4.31X)

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

About

Minified application examples with different languages and stacks for DockerSlim

dockersl.im

Topics

hacktoberfest

Resources

Readme
Apache-2.0 license

Contributing

Contributing
Activity
Custom properties

Stars

195 stars

Watchers

8 watching

Forks

24 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.