From b9872ed62476d1eb9c0808e7450885a0f784f693 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Thu, 27 Jun 2019 00:13:57 +0200 Subject: [PATCH] Dockerize inliner command --- Dockerfile | 8 ++++++++ Makefile | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..49b5f20 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM node:10 + +RUN npm install inliner + +ENTRYPOINT /node_modules/.bin/inliner + +ADD *.png / +ADD *.css / diff --git a/Makefile b/Makefile index 1cbfbbf..d86e09d 100644 --- a/Makefile +++ b/Makefile @@ -2,4 +2,8 @@ IMAGES=$(wildcard *.jpg *.png) CSSFILES=$(wildcard *.css) index.min.html: index.html $(CSSFILES) $(IMAGES) - inliner "$<" > "$@" + docker build -t inliner:latest . + docker run -i --rm inliner:latest <"$<" >"$@" + +clean: + rm -f index.min.html