From de211f9ed30ec4cf7b28874c9231508f6de10609 Mon Sep 17 00:00:00 2001 From: Koen Rouwhorst Date: Sat, 19 Jan 2019 12:24:20 +0100 Subject: [PATCH] Bumped ESLint to v5.12.1, added integrity check. --- eslint/Dockerfile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/eslint/Dockerfile b/eslint/Dockerfile index 3bafdba..25b7234 100644 --- a/eslint/Dockerfile +++ b/eslint/Dockerfile @@ -7,15 +7,21 @@ LABEL "com.github.actions.name"="GitHub Action for ESLint" LABEL "com.github.actions.icon"="code" LABEL "com.github.actions.color"="blue" -ENV ESLINT_VERSION=5.11.1 \ +ENV ESLINT_VERSION=5.12.1 \ + ESLINT_CHECKSUM="642ba59e25de166cf730d6eeb0af9b6f37ab21a04f5726baae6b1588da4afa60" \ PATH=/usr/lib/node_modules/.bin:$PATH -RUN npm install -g eslint@${ESLINT_VERSION} && \ - rm -rf /usr/share/man /tmp/* \ - /root/.npm /root/.node-gyp \ - /usr/lib/node_modules/npm/man \ - /usr/lib/node_modules/npm/doc \ - /usr/lib/node_modules/npm/html +RUN set -x && \ + wget -O "eslint-$ESLINT_VERSION.tgz" "https://registry.npmjs.org/eslint/-/eslint-$ESLINT_VERSION.tgz" && \ + echo "${ESLINT_CHECKSUM} *eslint-$ESLINT_VERSION.tgz" | sha256sum -c - && \ + npm install -g "eslint-$ESLINT_VERSION.tgz" && \ + rm -rf "eslint-$ESLINT_VERSION.tgz" \ + /usr/share/man \ + /root/.npm /root/.node-gyp \ + /usr/lib/node_modules/npm/man \ + /usr/lib/node_modules/npm/doc \ + /usr/lib/node_modules/npm/html \ + /tmp/* COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"]