Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 7e61fbf

Browse files
authored
chore: fix docker images (#3654)
Install node-pre-gyp before IPFS and switch to official node image as the size difference is now quite small.
1 parent 084589c commit 7e61fbf

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Dockerfile.latest

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mhart/alpine-node:15
1+
FROM node:16-alpine
22

33
ENV IPFS_VERSION=latest
44
ENV IPFS_MONITORING=1
@@ -7,9 +7,12 @@ ENV BUILD_DEPS='libnspr4 libnspr4-dev libnss3'
77

88
RUN apk add --no-cache git python3 build-base
99

10-
RUN npm install --unsafe-perm -g ipfs@"$IPFS_VERSION"
10+
# Hopefully remove when https://github.com/node-webrtc/node-webrtc/pull/694 is merged
11+
RUN npm install -g @mapbox/node-pre-gyp
12+
RUN npm install -g ipfs@"$IPFS_VERSION"
1113

1214
# Make the image a bit smaller
15+
RUN npm uninstall -g @mapbox/node-pre-gyp
1316
RUN npm cache clear --force
1417
RUN apk del build-base python3 git
1518

Dockerfile.next

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mhart/alpine-node:15
1+
FROM node:16-alpine
22

33
ENV IPFS_VERSION=next
44
ENV IPFS_MONITORING=1
@@ -7,9 +7,12 @@ ENV BUILD_DEPS='libnspr4 libnspr4-dev libnss3'
77

88
RUN apk add --no-cache git python3 build-base
99

10-
RUN npm install --unsafe-perm -g ipfs@"$IPFS_VERSION"
10+
# Hopefully remove when https://github.com/node-webrtc/node-webrtc/pull/694 is merged
11+
RUN npm install -g @mapbox/node-pre-gyp
12+
RUN npm install -g ipfs@"$IPFS_VERSION"
1113

1214
# Make the image a bit smaller
15+
RUN npm uninstall -g @mapbox/node-pre-gyp
1316
RUN npm cache clear --force
1417
RUN apk del build-base python3 git
1518

0 commit comments

Comments
 (0)