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

Commit

Permalink
chore: fix docker images (#3654)
Browse files Browse the repository at this point in the history
Install node-pre-gyp before IPFS and switch to official node image
as the size difference is now quite small.
  • Loading branch information
achingbrain committed Apr 29, 2021
1 parent 084589c commit 7e61fbf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions Dockerfile.latest
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mhart/alpine-node:15
FROM node:16-alpine

ENV IPFS_VERSION=latest
ENV IPFS_MONITORING=1
Expand All @@ -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

Expand Down
7 changes: 5 additions & 2 deletions Dockerfile.next
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mhart/alpine-node:15
FROM node:16-alpine

ENV IPFS_VERSION=next
ENV IPFS_MONITORING=1
Expand All @@ -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

Expand Down

0 comments on commit 7e61fbf

Please sign in to comment.