|
@@ -0,0 +1,42 @@
|
|
|
|
|
+FROM ubuntu:16.04
|
|
|
|
|
+
|
|
|
|
|
+ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
+
|
|
|
|
|
+RUN \
|
|
|
|
|
+ sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
|
|
|
|
|
+ apt-get update && \
|
|
|
|
|
+ apt-get -y upgrade && \
|
|
|
|
|
+ apt-get -y install locales && \
|
|
|
|
|
+ locale-gen en_US.UTF-8
|
|
|
|
|
+
|
|
|
|
|
+RUN apt-get install -y curl git unzip wget
|
|
|
|
|
+
|
|
|
|
|
+ENV LANG en_US.UTF-8
|
|
|
|
|
+ENV LANGUAGE en_US.UTF-8
|
|
|
|
|
+ENV LC_ALL en_US.UTF-8
|
|
|
|
|
+ENV HOME /root
|
|
|
|
|
+
|
|
|
|
|
+RUN apt-get -y install supervisor && \
|
|
|
|
|
+ mkdir -p /var/log/supervisor && \
|
|
|
|
|
+ mkdir -p /etc/supervisor/conf.d
|
|
|
|
|
+
|
|
|
|
|
+ADD supervisor.conf /etc/supervisor.conf
|
|
|
|
|
+
|
|
|
|
|
+RUN apt-get clean
|
|
|
|
|
+
|
|
|
|
|
+ENV IPFS_PATH /data/ipfs
|
|
|
|
|
+RUN mkdir -p $IPFS_PATH \
|
|
|
|
|
+ && adduser --disabled-password --home=$IPFS_PATH ipfs \
|
|
|
|
|
+ && chown ipfs:ipfs $IPFS_PATH
|
|
|
|
|
+
|
|
|
|
|
+VOLUME $IPFS_PATH
|
|
|
|
|
+
|
|
|
|
|
+RUN mkdir /root/ipfs && \
|
|
|
|
|
+ curl 'https://vcs.bsch.ca/public/ipfs-binaries/raw/master/go-ipfs_v0.4.16_linux-amd64.tar.gz' | tar xzf - -C /root/ipfs && \
|
|
|
|
|
+ mv /root/ipfs/go-ipfs/ipfs /usr/local/bin/ipfs && \
|
|
|
|
|
+ rm -rf /root/ipfs
|
|
|
|
|
+
|
|
|
|
|
+ADD ipfs.supervisor.conf /etc/supervisor/conf.d/
|
|
|
|
|
+ADD start_ipfs /usr/local/bin/start_ipfs
|
|
|
|
|
+
|
|
|
|
|
+CMD ["supervisord", "-c", "/etc/supervisor.conf"]
|