diff --git a/tools.dockerfile b/tools.dockerfile index 9d1462a9..873f62e7 100644 --- a/tools.dockerfile +++ b/tools.dockerfile @@ -1,40 +1,44 @@ # FROM mhart/alpine-node:8 # FROM alpine:3.6 +# ENV NPM_VERSION=6.14.8 YARN_VERSION=v1.22.10 # FROM mhart/alpine-node:10 # FROM alpine:3.7 +# ENV NPM_VERSION=6.14.8 YARN_VERSION=v1.22.10 # FROM mhart/alpine-node:12 # FROM alpine:3.9 +# ENV NPM_VERSION=6.14.8 YARN_VERSION=v1.22.10 # FROM mhart/alpine-node:14 # FROM alpine:3.11 +# ENV NPM_VERSION=6.14.8 YARN_VERSION=v1.22.10 FROM mhart/alpine-node:15 FROM alpine:3.12 +ENV NPM_VERSION=7.0.3 YARN_VERSION=v1.22.10 COPY --from=0 /usr/bin/node /usr/bin/ -COPY --from=0 /usr/lib/node_modules /usr/lib/node_modules COPY --from=0 /usr/include/node /usr/include/node COPY --from=0 /usr/share/systemtap/tapset/node.stp /usr/share/systemtap/tapset/ RUN apk upgrade --no-cache -U && \ - apk add --no-cache curl gnupg libstdc++ -RUN /usr/lib/node_modules/npm/bin/npm-cli.js install -g npm@latest && \ + apk add --no-cache curl gnupg make bash libstdc++ +RUN curl -L https://www.npmjs.com/install.sh | npm_install=${NPM_VERSION} sh && \ find /usr/lib/node_modules/npm -type d \( -name test -o -name .bin \) | xargs rm -rf RUN for server in ipv4.pool.sks-keyservers.net keyserver.pgp.com ha.pool.sks-keyservers.net; do \ gpg --keyserver $server --recv-keys \ 6A010C5166006599AA17F08146C2130DFD2497F5 && break; \ done -RUN curl -sfSL -O https://yarnpkg.com/latest.tar.gz -O https://yarnpkg.com/latest.tar.gz.asc && \ - gpg --batch --verify latest.tar.gz.asc latest.tar.gz && \ +RUN curl -sfSL -O https://github.com/yarnpkg/yarn/releases/download/${YARN_VERSION}/yarn-${YARN_VERSION}.tar.gz -O https://github.com/yarnpkg/yarn/releases/download/${YARN_VERSION}/yarn-${YARN_VERSION}.tar.gz.asc && \ + gpg --batch --verify yarn-${YARN_VERSION}.tar.gz.asc yarn-${YARN_VERSION}.tar.gz && \ rm -rf /usr/local/share/yarn && \ mkdir /usr/local/share/yarn && \ - tar -xf latest.tar.gz -C /usr/local/share/yarn --strip 1 && \ + tar -xf yarn-${YARN_VERSION}.tar.gz -C /usr/local/share/yarn --strip 1 && \ ln -sf /usr/local/share/yarn/bin/yarn /usr/local/bin/ && \ ln -sf /usr/local/share/yarn/bin/yarnpkg /usr/local/bin/ -RUN apk del curl gnupg -RUN rm -rf latest.tar.gz* /tmp/* \ +RUN apk del curl gnupg make bash +RUN rm -rf *.tar.gz* /tmp/* \ /usr/share/man/* /usr/share/doc /root/.npm /root/.node-gyp /root/.config \ /usr/lib/node_modules/npm/man /usr/lib/node_modules/npm/doc /usr/lib/node_modules/npm/docs \ /usr/lib/node_modules/npm/html /usr/lib/node_modules/npm/scripts && \