Skip to content

Docker image giving the built version of the best image optimizing CLI apps together with image_optim to rule them all

License

Notifications You must be signed in to change notification settings

denji/docker-image_optim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-image_optim

Docker image

A docker image giving the built version of the best image optimizing CLI apps together with image_optim to rule them all

Credits

95% of this work it's from rhardih's first attempt at dockerizing this project.

Changes

  • Maintaining an additional Dockerfiles with fewer layers for production purposes
  • creating more layers, so if you need to test different versions you can avoid full rebuilds.
  • Versions have been bumped, and ordered alphabetically

Minimal usage

Execute image_optim in your current dir:

docker run --rm -ti -v $(pwd):/images/ denji/docker-image_optim image_optim -r .

How To Use

docker run --rm -ti \
  # Add whatever image directory you like
  # -v $(cd && cd images && pwd):/images/ \
  -v $(pwd)/config:/root/.config/ \
  denji/docker-image_optim sh

Then a simple cd /images && image_optim -r . would optimize all the images in the mounted path.

How to Build

docker build -t image_optim . and (after a while) you can run your custom-built image

docker run --rm -ti \
  # Add whatever image directory you like
  # -v $(cd && cd images && pwd):/images/ \
  -v $(pwd)/config:/root/.config/ \
  docker-image_optim sh

Configuration

A demo configuration (LOSSY!) can be found in config/image_optim.yml, all the options are listed here

Footprint

A serious shrink in footprint has been achieved squashing all the RUN layers into one.
The drawback is having to maintain 2 Dockerfiles

$ docker images
REPOSITORY                          TAG      SIZE
denji/docker-image_optim       dev      365MB
denji/docker-image_optim       latest   93.8MB

About

Docker image giving the built version of the best image optimizing CLI apps together with image_optim to rule them all

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 95.6%
  • Shell 4.4%