This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +28
-12
lines changed
Expand file tree Collapse file tree 2 files changed +28
-12
lines changed Original file line number Diff line number Diff line change 1- FROM node:6
2-
3- RUN apt-get update
4- RUN apt-get install --yes python2.7 git-all pkg-config libncurses5-dev libssl-dev libnss3-dev libexpat-dev libc6
1+ FROM node:9.5.0
52
63WORKDIR /usr/src/app
7-
8- COPY package.json /usr/src/app/package.json
9-
10- RUN npm install
11- RUN npm install wrtc
12-
134COPY . /usr/src/app
145
156ENV IPFS_WRTC_LINUX_WINDOWS=1
167ENV IPFS_BOOTSTRAP=1
178ENV IPFS_MONITORING=1
189ENV IPFS_PATH=/root/.jsipfs
1910
11+ ENV BUILD_DEPS='libnspr4 libnspr4-dev libnss3'
12+
2013EXPOSE 4002
2114EXPOSE 4003
2215EXPOSE 5002
2316EXPOSE 9090
2417
18+ RUN apt-get update \
19+ && apt-get install --yes $BUILD_DEPS \
20+ && rm -rf /var/lib/apt/lists/* \
21+ && npm install --production \
22+ && npm install wrtc@0.0.67 --production \
23+ && npm cache clear --force \
24+ && apt-get purge --yes $BUILD_DEPS \
25+ && rm -rf /usr/share/doc /usr/share/locale \
26+ && rm -rf /usr/local/share/.cache \
27+ && rm -rf node_modules/go-ipfs-dep/go-ipfs/ipfs
28+
2529CMD ./init-and-daemon.sh
Original file line number Diff line number Diff line change 1- #! /bin/sh -e
2- node src/cli/bin.js init
1+ #! /usr/bin/env bash
2+
3+ set -e
4+
5+ if [ -n $IPFS_PATH ]; then
6+ echo " Using $IPFS_PATH as IPFS repository"
7+ else
8+ echo " You need to set IPFS_PATH environment variable to use this script"
9+ exit 1
10+ fi
311
412sed -i.bak ' s/127.0.0.1/0.0.0.0/g' $IPFS_PATH /config
513
14+ # Initialize the repo but ignore if error if it already exists
15+ # This can be the case when we restart a container without stopping/removing it
16+ node src/cli/bin.js init || true
17+
618node src/cli/bin.js daemon
You can’t perform that action at this time.
0 commit comments