Skip to content

Instantly share code, notes, and snippets.

@lludlow
Created November 8, 2017 19:01
Show Gist options
  • Save lludlow/b9d4ae0bc00159d5e903411a8226fe15 to your computer and use it in GitHub Desktop.
Save lludlow/b9d4ae0bc00159d5e903411a8226fe15 to your computer and use it in GitHub Desktop.
FROM ubuntu:16.04
ENV GIT_URL git://github.com/MyHush/hush.git
ENV HUSH_CONF /root/.hush/hush.conf
# install dependencies
RUN apt-get autoclean && apt-get autoremove && apt-get update && \
apt-get -qqy install --no-install-recommends build-essential \
automake ncurses-dev libcurl4-openssl-dev libssl-dev libgtest-dev \
make autoconf automake libtool git apt-utils pkg-config libc6-dev \
libcurl3-dev libudev-dev m4 g++-multilib unzip git python zlib1g-dev \
wget bsdmainutils && \
rm -rf /var/lib/apt/lists/*
# create code directory
RUN echo "check_certificate = off" > /root/.wgetrc && mkdir -p /opt/code/; cd /opt/code; \
git clone ${GIT_URL} hush && cd hush && \
./zcutil/fetch-params.sh && ./zcutil/build.sh -j4 && cd /opt/code/hush/src && \
/usr/bin/install -c hushd hush-cli -t /usr/local/bin/ && \
rm -rf /opt/code/
# generate a dummy config
RUN PASS=$(date | md5sum | cut -c1-24); mkdir -p /root/.hush/; \
printf '%s\n%s\n%s\n%s\n%s\n' "rpcuser=hushRPC" "rpcpassword=${PASS}" \
"addnode=mmc01.madbuda.me" >> ${HUSH_CONF}
# no parameters display help
ENTRYPOINT ["/usr/local/bin/hushd"]
CMD ["--help"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment