Last active
December 26, 2016 15:37
-
-
Save Zatvobor/3e16110385133219d36b to your computer and use it in GitHub Desktop.
SIAD Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
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