Skip to content

Instantly share code, notes, and snippets.

@Zatvobor
Last active December 26, 2016 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zatvobor/3e16110385133219d36b to your computer and use it in GitHub Desktop.
Save Zatvobor/3e16110385133219d36b to your computer and use it in GitHub Desktop.
SIAD Dockerfile
FROM phusion/baseimage
MAINTAINER Zatvobor <http://zatvobor.github.io>
RUN apt-get update \
&& apt-get install -y curl unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV SIA_VERSION 1.0.4
ENV SIA_RELEASE Sia-v$SIA_VERSION-lts-linux-amd64
ENV SIA_DOWNLOAD_URL https://github.com/NebulousLabs/Sia/releases/download/lts-v$SIA_VERSION/$SIA_RELEASE.zip
RUN cd /tmp \
&& curl -sSL "$SIA_DOWNLOAD_URL" -o sia.zip \
&& unzip sia.zip \
&& cd $SIA_RELEASE \
&& mv siad siac /usr/bin/ \
&& rm -rf $SIA_RELEASE \
&& echo "#""!/bin/bash\n/usr/bin/siad --sia-directory=/sia \"\$@\"" > /usr/local/bin/siad \
&& echo "#""!/bin/bash\n/usr/bin/siac \"\$@\"" > /usr/local/bin/siac \
&& chmod a+x /usr/local/bin/siad /usr/local/bin/siac /usr/bin/siad /usr/bin/siac
VOLUME /sia
EXPOSE 9980 9981 9982
CMD /usr/local/bin/siad
@Zatvobor
Copy link
Author

Zatvobor commented Oct 21, 2015

misc:

  • mkdir /usr/local/sia-db
  • docker build -f siad.dockerfile -t siad:1.0.4-lts .
  • docker run -v /usr/local/sia-db:/sia -p IP:9981:9981 -dti --name=siad siad:1.0.4-lts
    • in case of host docker run -v /usr/local/sia-db:/sia -p IP:9981:9981 -p IP:9982:9982 -dti --name=siad siad:0.6.0-beta
  • docker execute siad siac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment