From 624ef6158bde8b52418b53060f97cddf865cd9de Mon Sep 17 00:00:00 2001 From: achingbrain Date: Thu, 29 Apr 2021 11:28:48 +0100 Subject: [PATCH] chore: fix docker images Install node-pre-gyp before IPFS and switch to official node image as the size difference is now quite small. --- Dockerfile.latest | 7 +++++-- Dockerfile.next | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Dockerfile.latest b/Dockerfile.latest index 085684d7fd..561126ae68 100644 --- a/Dockerfile.latest +++ b/Dockerfile.latest @@ -1,4 +1,4 @@ -FROM mhart/alpine-node:15 +FROM node:16-alpine ENV IPFS_VERSION=latest ENV IPFS_MONITORING=1 @@ -7,9 +7,12 @@ ENV BUILD_DEPS='libnspr4 libnspr4-dev libnss3' RUN apk add --no-cache git python3 build-base -RUN npm install --unsafe-perm -g ipfs@"$IPFS_VERSION" +# Hopefully remove when https://github.com/node-webrtc/node-webrtc/pull/694 is merged +RUN npm install -g @mapbox/node-pre-gyp +RUN npm install -g ipfs@"$IPFS_VERSION" # Make the image a bit smaller +RUN npm uninstall -g @mapbox/node-pre-gyp RUN npm cache clear --force RUN apk del build-base python3 git diff --git a/Dockerfile.next b/Dockerfile.next index 2c63a9f629..f517a8e350 100644 --- a/Dockerfile.next +++ b/Dockerfile.next @@ -1,4 +1,4 @@ -FROM mhart/alpine-node:15 +FROM node:16-alpine ENV IPFS_VERSION=next ENV IPFS_MONITORING=1 @@ -7,9 +7,12 @@ ENV BUILD_DEPS='libnspr4 libnspr4-dev libnss3' RUN apk add --no-cache git python3 build-base -RUN npm install --unsafe-perm -g ipfs@"$IPFS_VERSION" +# Hopefully remove when https://github.com/node-webrtc/node-webrtc/pull/694 is merged +RUN npm install -g @mapbox/node-pre-gyp +RUN npm install -g ipfs@"$IPFS_VERSION" # Make the image a bit smaller +RUN npm uninstall -g @mapbox/node-pre-gyp RUN npm cache clear --force RUN apk del build-base python3 git