From a03b5922249cd5a581ee1761fa5a8c120526613f Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Sun, 23 Nov 2014 20:08:34 -0500 Subject: [PATCH] add docker image support --- Dockerfile | 7 +++++++ README.md | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..90f9e619d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM node + +RUN apt-get update +RUN apt-get install -y --no-install-recommends libcairo2-dev libgif-dev optipng pngcrush pngquant libpango1.0-dev graphicsmagick libjpeg-turbo-progs inkscape libvips-dev libgsf-1-dev +RUN npm install -g assetgraph-builder + +ENTRYPOINT ["/usr/local/bin/buildProduction"] diff --git a/README.md b/README.md index 508f08caf..dfb182221 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,17 @@ Looking for a Grunt integration? Try [grunt-reduce](https://github.com/Munter/gr Quick start ----------- +# Conventional ``` npm install -g assetgraph-builder buildProduction path/to/your/index.html --outroot path/to/output/directory ``` +# [Docker](https://www.docker.com/) +``` +docker run --rm -it -v "$(pwd)":/app/ -w /app/ assetgraph-builder path/to/your/index.html --outroot path/to/output/directory +``` + Congratulations, you just optimized your web page! Features