docker-bitcoind/Dockerfile

56 lines
1.6 KiB
Docker
Raw Normal View History

2016-08-18 09:45:34 +00:00
FROM phusion/baseimage:0.9.19
2016-04-11 03:38:48 +00:00
2016-04-11 16:01:09 +00:00
ENV BITCOIND_REV master
2016-04-11 03:56:50 +00:00
2016-08-18 09:45:34 +00:00
ARG UBUNTU_MIRROR=mirror://mirrors.ubuntu.com/mirrors.txt
2016-08-18 09:50:03 +00:00
RUN sed -i \
-e s#http://archive.ubuntu.com/ubuntu/#${UBUNTU_MIRROR}#g \
-e s#http://security.ubuntu.com/ubuntu/#${UBUNTU_MIRROR}#g \
2016-08-18 09:45:34 +00:00
/etc/apt/sources.list ; \
cat /etc/apt/sources.list
2016-04-11 03:38:48 +00:00
RUN apt-get update && \
apt-get install -y \
build-essential libtool autotools-dev automake pkg-config libssl-dev \
2016-04-11 13:56:35 +00:00
libevent-dev bsdmainutils libzmq3 libzmq3-dev \
libboost-system-dev libboost-filesystem-dev libboost-chrono-dev \
libboost-program-options-dev libboost-test-dev libboost-thread-dev \
2016-04-11 03:53:24 +00:00
libminiupnpc-dev git && \
2016-04-11 03:38:48 +00:00
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2016-04-11 03:53:24 +00:00
RUN git clone https://github.com/bitcoin/bitcoin.git /usr/local/src/bitcoin
2016-04-11 03:38:48 +00:00
2016-04-11 03:53:24 +00:00
RUN cd /usr/local/src/bitcoin && \
git checkout $BITCOIND_REV && \
2016-04-11 03:38:48 +00:00
./autogen.sh && \
./configure --disable-wallet --enable-hardening && \
2016-04-11 15:51:16 +00:00
make -j2 && \
2016-04-11 03:53:24 +00:00
make install && \
cd / && \
rm -rf /usr/local/src/bitcoin
2016-04-11 03:38:48 +00:00
RUN apt-get remove -y \
2016-04-11 15:51:16 +00:00
build-essential libtool autotools-dev automake \
pkg-config bsdmainutils git && \
2016-04-11 03:38:48 +00:00
apt-get autoremove -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV HOME /var/lib/bitcoin
RUN useradd -s /bin/bash -m -d /var/lib/bitcoin bitcoin
RUN chown bitcoin:bitcoin -R /var/lib/bitcoin
2016-04-11 03:53:24 +00:00
VOLUME ["/var/lib/bitcoin"]
2016-04-11 03:38:48 +00:00
EXPOSE 8332
2016-04-11 03:53:24 +00:00
2016-04-11 03:38:48 +00:00
EXPOSE 8333
RUN mkdir -p /etc/service/bitcoin
ADD bitcoin.run /etc/service/bitcoin/run
2016-04-11 03:53:24 +00:00
2016-04-11 03:38:48 +00:00
RUN mkdir -p /etc/service/bitcoin/log
ADD bitcoin.log.run /etc/service/bitcoin/log/run
2016-04-11 03:53:24 +00:00
2016-04-11 03:38:48 +00:00
RUN chmod +x /etc/service/bitcoin/log/run \
/etc/service/bitcoin/run