docker-steemd/Dockerfile

140 lines
3.2 KiB
Docker
Raw Normal View History

2016-08-18 10:19:41 +00:00
FROM phusion/baseimage:0.9.19
2016-08-18 11:50:02 +00:00
# steem:master as of 2016-08-18
2016-08-18 10:19:41 +00:00
ARG STEEMD_REPO=https://github.com/steemit/steem.git
2016-09-01 22:47:17 +00:00
ARG STEEMD_REV=master
2016-08-18 11:50:02 +00:00
# secp256k1:master as of 2016-08-18
ARG SECP256K1_REPO=https://github.com/bitcoin/secp256k1
2016-09-01 22:47:17 +00:00
ARG SECP256K1_REV=master
2016-08-18 11:50:02 +00:00
2016-09-01 22:50:10 +00:00
ARG UBUNTU_MIRROR=mirror://mirrors.ubuntu.com/mirrors.txt
RUN sed -i \
-e s#http://archive.ubuntu.com/ubuntu/#${UBUNTU_MIRROR}#g \
-e s#http://security.ubuntu.com/ubuntu/#${UBUNTU_MIRROR}#g \
/etc/apt/sources.list ; \
grep -v deb-src /etc/apt/sources.list > \
/etc/apt/sources.list.new && \
mv /etc/apt/sources.list.new /etc/apt/sources.list && \
cat /etc/apt/sources.list
2016-08-18 10:19:41 +00:00
RUN \
apt-get update && \
apt-get install -y \
2016-08-18 11:50:02 +00:00
autoconf \
2016-08-18 10:19:41 +00:00
automake \
autotools-dev \
bsdmainutils \
build-essential \
cmake \
2016-08-18 11:50:02 +00:00
doxygen \
2016-08-18 10:19:41 +00:00
git \
2016-08-18 11:50:02 +00:00
libboost-all-dev \
libreadline-dev \
2016-08-18 10:19:41 +00:00
libssl-dev \
libtool \
2016-08-18 11:50:02 +00:00
ncurses-dev \
python3 \
python3-dev \
2016-08-18 10:19:41 +00:00
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN \
2016-08-18 11:50:02 +00:00
git clone \
$SECP256K1_REPO \
/usr/local/src/secp256k1 && \
cd /usr/local/src/secp256k1 && \
git checkout $SECP256K1_REV && \
2016-08-18 10:19:41 +00:00
./autogen.sh && \
2016-08-18 11:50:02 +00:00
./configure && \
2016-09-01 22:48:38 +00:00
make -j$(nproc) && \
2016-08-18 11:50:02 +00:00
./tests && \
2016-08-18 10:19:41 +00:00
make install && \
cd / && \
2016-08-18 11:50:02 +00:00
rm -rfv /usr/local/src/secp256k1
RUN \
git clone \
$STEEMD_REPO \
/usr/local/src/steem && \
cd /usr/local/src/steem && \
git checkout $STEEMD_REV && \
git submodule update --init --recursive && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DLOW_MEMORY_NODE=ON \
. \
&& \
2016-09-01 22:48:38 +00:00
make -j$(nproc) && \
2016-08-18 11:50:02 +00:00
make install && \
2016-08-18 10:19:41 +00:00
rm -rf /usr/local/src/steem
2016-08-18 11:50:02 +00:00
# FIXME run steemd tests as part of build
2016-08-18 10:19:41 +00:00
RUN \
apt-get remove -y \
automake \
autotools-dev \
bsdmainutils \
build-essential \
2016-08-19 12:34:16 +00:00
cmake \
2016-08-18 11:50:02 +00:00
doxygen \
2016-08-19 12:34:16 +00:00
dpkg-dev \
2016-08-18 10:19:41 +00:00
git \
2016-08-19 12:34:16 +00:00
libboost-all-dev \
libc6-dev \
libexpat1-dev \
libgcc-5-dev \
libhwloc-dev \
libibverbs-dev \
libicu-dev \
libltdl-dev \
libncurses5-dev \
libnuma-dev \
libopenmpi-dev \
libpython-dev \
libpython2.7-dev \
libreadline-dev \
libreadline6-dev \
2016-08-18 11:50:02 +00:00
libssl-dev \
2016-08-19 12:34:16 +00:00
libstdc++-5-dev \
libtinfo-dev \
2016-08-18 10:19:41 +00:00
libtool \
2016-08-19 12:34:16 +00:00
linux-libc-dev \
m4 \
make \
manpages \
manpages-dev \
mpi-default-dev \
python-dev \
python2.7-dev \
2016-08-18 11:50:02 +00:00
python3-dev \
2016-08-18 10:19:41 +00:00
&& \
apt-get autoremove -y && \
2016-08-19 12:34:16 +00:00
rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
/usr/include \
/usr/local/include
2016-08-18 10:19:41 +00:00
ENV HOME /var/lib/steemd
RUN useradd -s /bin/bash -m -d /var/lib/steemd steemd
RUN chown steemd:steemd -R /var/lib/steemd
VOLUME ["/var/lib/steemd"]
2016-08-18 12:03:02 +00:00
# rpc service:
EXPOSE 8090
# p2p service:
EXPOSE 2001
2016-08-18 10:19:41 +00:00
RUN mkdir -p /etc/service/steemd
ADD steemd.run /etc/service/steemd/run
2016-08-18 12:11:25 +00:00
RUN chmod +x /etc/service/steemd/run
2016-09-01 22:43:33 +00:00
2016-09-01 23:04:51 +00:00
ADD config.ini /etc/steemd/config.ini