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
5
2
6
3
WORKDIR /usr/src/app
7
-
8
- COPY package.json /usr/src/app/package.json
9
-
10
- RUN npm install
11
- RUN npm install wrtc
12
-
13
4
COPY . /usr/src/app
14
5
15
6
ENV IPFS_WRTC_LINUX_WINDOWS=1
16
7
ENV IPFS_BOOTSTRAP=1
17
8
ENV IPFS_MONITORING=1
18
9
ENV IPFS_PATH=/root/.jsipfs
19
10
11
+ ENV BUILD_DEPS='libnspr4 libnspr4-dev libnss3'
12
+
20
13
EXPOSE 4002
21
14
EXPOSE 4003
22
15
EXPOSE 5002
23
16
EXPOSE 9090
24
17
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
[email protected] --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
+
25
29
CMD ./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
3
11
4
12
sed -i.bak ' s/127.0.0.1/0.0.0.0/g' $IPFS_PATH /config
5
13
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
+
6
18
node src/cli/bin.js daemon
You can’t perform that action at this time.
0 commit comments