forked from soy-bean-lean/ipfs-js-ipfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (25 loc) · 745 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM node:9.5.0
WORKDIR /usr/src/app
COPY . /usr/src/app
ENV IPFS_WRTC_LINUX_WINDOWS=1
ENV IPFS_BOOTSTRAP=1
ENV IPFS_MONITORING=1
ENV IPFS_PATH=/root/.jsipfs
ENV IPFS_API_HOST=0.0.0.0
ENV BUILD_DEPS='libnspr4 libnspr4-dev libnss3'
EXPOSE 4002
EXPOSE 4003
EXPOSE 5002
EXPOSE 9090
RUN apt-get update \
&& apt-get install --yes $BUILD_DEPS \
&& rm -rf /var/lib/apt/lists/* \
&& npm install --production \
&& npm install [email protected] --production \
&& npm cache clear --force \
&& apt-get purge --yes $BUILD_DEPS \
&& rm -rf /usr/share/doc /usr/share/locale \
&& rm -rf /usr/local/share/.cache \
&& rm -rf node_modules/go-ipfs-dep/go-ipfs/ipfs \
&& ln -s $(pwd)/src/cli/bin.js /usr/local/bin/jsipfs
CMD ./init-and-daemon.sh