Created
December 24, 2017 12:39
-
-
Save gregn610/4fc8e42677d3ac9747a2e8b650c295a5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 alpine:3.7 | |
RUN mkdir /src | |
WORKDIR /src | |
RUN apk --no-cache --update add \ | |
alpine-base \ | |
alpine-sdk \ | |
autoconf \ | |
automake \ | |
git \ | |
libevent-dev \ | |
libtool \ | |
openssl-dev \ | |
sed | |
# Need BerkleyDB | |
# Thanks: https://github.com/zcoinofficial/xzc_be/blob/master/docker/zcoin/Dockerfile | |
# | |
RUN apk --no-cache --update add libstdc++ openssl boost-thread boost-system boost-filesystem \ | |
boost-program_options alpine-sdk file openssl-dev boost-dev && \ | |
cd /src/ && \ | |
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz | |
RUN tar -xvf db-4.8.30.NC.tar.gz && \ | |
cd db-4.8.30.NC && \ | |
sed -i.old 's/__atomic_compare_exchange/__atomic_compare_exchange_db/' dbinc/atomic.h && \ | |
cd build_unix && \ | |
../dist/configure --disable-shared --enable-cxx --disable-replication --with-pic && \ | |
make libdb_cxx-4.8.a libdb-4.8.a && \ | |
make install_lib install_include | |
ENV BDB_LIB_PATH=/usr/local/BerkeleyDB.4.8/lib \ | |
BDB_INCLUDE_PATH=/usr/local/BerkeleyDB.4.8/include | |
ARG GIT_COMMIT_LITECOIN=v0.14.2 | |
RUN git clone https://github.com/litecoin-project/litecoin.git | |
RUN cd /src/litecoin/ && \ | |
git checkout -B buildbot $GIT_COMMIT_LITECOIN && \ | |
cd /src/litecoin/ && \ | |
./autogen.sh && \ | |
./configure LDFLAGS="-L${BDB_LIB_PATH}" CPPFLAGS="-I${BDB_INCLUDE_PATH}" && \ | |
make -j4 && \ | |
make install && \ | |
echo "Build Done!" | |
#default: 9333 or testnet: 19335 | |
EXPOSE 9333 9332 19335 19332 | |
ENV LITECOIN_RPC_USERNAME=covfefe | |
ENV LITECOIN_RPC_SALT=covfefe | |
ENV LITECOIN_RPC_HASH=covfefe | |
ENTRYPOINT ["/usr/local/bin/litecoind"] | |
CMD ["-rpcauth=${LITECOIN_RPC_USERNAME}:${LITECOIN_RPC_SALT}$$${LITECOIN_RPC_HASH}", \ | |
"-datadir=/volumes/litecoind", "-server", \ | |
"-printtoconsole", "-testnet" ] | |
# ToDo: strip binaries ??? | |
RUN mkdir -p /volumes/litecoind/ | |
VOLUME /volumes/litecoind |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you manage to figure how to run litecoind on alpine?