From 32993385daad3a66d6a2f8094c1dde5c33d2a03b Mon Sep 17 00:00:00 2001 From: Oleg Nenashev Date: Mon, 15 Jul 2019 19:02:08 +0200 Subject: [PATCH] Add a SVGO Docker image --- .dockerignore | 3 +++ CONTRIBUTING.md | 4 ++++ Dockerfile | 8 ++++++++ 3 files changed, 15 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..cc53c25c8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +Dockerfile +README.md +icons/* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b917f40ca..941d3d3d0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,6 +83,10 @@ All icons in Simple Icons have been optimized with the [SVGO tool](https://githu * Set the precision to about 3, depending on if there is a loss of quality. * Leave the remaining settings untouched (or reset them with the button at the bottom of the settings). * Click the download button. +* The [SVGO Command Line Tool](https://github.com/svg/svgo) in Docker + * If none of the options above work for you, it is possible to build a Docker image for compressing the images + * Build: `docker build -t simple-icons/svgo-optimizer .` + * Run: `docker run --rm -v ${full local path}:/image.svg simple-icons/svgo-optimizer` ### 4. Annotate The Icon diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..b7ad88cdd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM node:6 + +WORKDIR /work +COPY package*.json /work/ +RUN npm install + +COPY * /work/ +ENTRYPOINT [ "npm", "run", "svgo", "--", "/image.svg" ]