Dockerfile 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. FROM ubuntu:16.04
  2. ENV DEBIAN_FRONTEND noninteractive
  3. RUN \
  4. sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
  5. apt-get update && \
  6. apt-get -y upgrade && \
  7. apt-get -y install locales && \
  8. locale-gen en_US.UTF-8
  9. RUN apt-get install -y curl git unzip wget
  10. ENV LANG en_US.UTF-8
  11. ENV LANGUAGE en_US.UTF-8
  12. ENV LC_ALL en_US.UTF-8
  13. ENV HOME /root
  14. RUN apt-get -y install supervisor && \
  15. mkdir -p /var/log/supervisor && \
  16. mkdir -p /etc/supervisor/conf.d
  17. ADD supervisor.conf /etc/supervisor.conf
  18. RUN apt-get clean
  19. ENV IPFS_PATH /data/ipfs
  20. RUN mkdir -p $IPFS_PATH \
  21. && adduser --disabled-password --home=$IPFS_PATH ipfs \
  22. && chown ipfs:ipfs $IPFS_PATH
  23. VOLUME $IPFS_PATH
  24. RUN mkdir /root/ipfs && \
  25. curl 'https://vcs.bsch.ca/public/ipfs-binaries/raw/master/go-ipfs_v0.4.16_linux-amd64.tar.gz' | tar xzf - -C /root/ipfs && \
  26. mv /root/ipfs/go-ipfs/ipfs /usr/local/bin/ipfs && \
  27. rm -rf /root/ipfs
  28. ADD ipfs.supervisor.conf /etc/supervisor/conf.d/
  29. ADD start_ipfs /usr/local/bin/start_ipfs
  30. CMD ["supervisord", "-c", "/etc/supervisor.conf"]