Skip to content

Commit

Permalink
bump alpine release and monero release
Browse files Browse the repository at this point in the history
  • Loading branch information
cornfeedhobo committed Dec 6, 2019
1 parent b93767e commit 20ca1bc
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 112 deletions.
166 changes: 66 additions & 100 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,144 +1,110 @@
# Multistage docker build, requires docker 17.05

# builder stage
FROM alpine:3.9 as builder
FROM alpine:3.10 as builder

RUN set -ex && apk add --update --no-cache \
autoconf \
automake \
boost \
boost-atomic \
boost-build \
boost-build-doc \
boost-chrono \
boost-container \
boost-context \
boost-contract \
boost-coroutine \
boost-date_time \
boost-dev \
boost-doc \
boost-fiber \
boost-filesystem \
boost-graph \
boost-iostreams \
boost-libs \
boost-locale \
boost-log \
boost-log_setup \
boost-math \
boost-prg_exec_monitor \
boost-program_options \
boost-python2 \
boost-python3 \
boost-random \
boost-regex \
boost-serialization \
boost-stacktrace_basic \
boost-stacktrace_noop \
boost-static \
boost-system \
boost-thread \
boost-timer \
boost-type_erasure \
boost-unit_test_framework \
boost-wave \
boost-wserialization \
ca-certificates \
cmake \
curl \
dev86 \
doxygen \
eudev-dev \
file \
g++ \
git \
graphviz \
libexecinfo-dev \
libsodium-dev \
libtool \
libusb-dev \
linux-headers \
make \
miniupnpc-dev \
ncurses-dev \
openssl-dev \
pcsc-lite-dev \
pkgconf

WORKDIR /usr/local

# Boost
ARG BOOST_VERSION=1_69_0
ARG BOOST_VERSION_DOT=1.69.0
ARG BOOST_HASH=8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406
RUN set -ex \
&& curl -s -L -o boost_${BOOST_VERSION}.tar.bz2 https://dl.bintray.com/boostorg/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2 \
&& echo "${BOOST_HASH} boost_${BOOST_VERSION}.tar.bz2" | sha256sum -c \
&& tar -xvf boost_${BOOST_VERSION}.tar.bz2 \
&& cd boost_${BOOST_VERSION} \
&& ./bootstrap.sh \
&& ./b2 \
--build-type=minimal \
link=static \
runtime-link=static \
--with-chrono \
--with-date_time \
--with-filesystem \
--with-program_options \
--with-regex \
--with-serialization \
--with-system \
--with-thread \
--with-locale \
threading=multi \
threadapi=pthread \
cflags="-fPIC" \
cxxflags="-fPIC" \
stage
ENV BOOST_ROOT /usr/local/boost_${BOOST_VERSION}

# OpenSSL
ARG OPENSSL_VERSION=1.1.1b
ARG OPENSSL_HASH=5c557b023230413dfb0756f3137a13e6d726838ccd1430888ad15bfb2b43ea4b
RUN set -ex \
&& curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
&& echo "${OPENSSL_HASH} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c \
&& tar -xzf openssl-${OPENSSL_VERSION}.tar.gz \
&& cd openssl-${OPENSSL_VERSION} \
&& ./Configure linux-x86_64 no-shared no-async --static -fPIC \
&& make build_libs \
&& make install
ENV OPENSSL_ROOT_DIR=/usr/local/openssl-${OPENSSL_VERSION}

# Sodium
ARG SODIUM_VERSION=1.0.17
ARG SODIUM_HASH=b732443c442239c2e0184820e9b23cca0de0828c
RUN set -ex \
&& git clone --depth 1 -b ${SODIUM_VERSION} https://github.com/jedisct1/libsodium.git \
&& cd libsodium \
&& test `git rev-parse HEAD` = ${SODIUM_HASH} || exit 1 \
&& ./autogen.sh \
&& CFLAGS="-fPIC" CXXFLAGS="-fPIC" ./configure \
&& make \
&& make check \
&& make install

# ZMQ
ARG ZMQ_VERSION=v4.3.1
ARG ZMQ_HASH=2cb1240db64ce1ea299e00474c646a2453a8435b
RUN set -ex \
&& git clone --depth 1 -b ${ZMQ_VERSION} https://github.com/zeromq/libzmq.git \
&& cd libzmq \
&& test `git rev-parse HEAD` = ${ZMQ_HASH} || exit 1 \
&& ./autogen.sh \
&& CFLAGS="-fPIC" CXXFLAGS="-fPIC" ./configure --enable-static --disable-shared \
&& make \
&& make install \
&& ldconfig .
pkgconf \
protobuf-dev \
rapidjson-dev \
readline-dev \
zeromq-dev

# zmq.hpp
ARG CPPZMQ_VERSION=v4.3.0
ARG CPPZMQ_HASH=213da0b04ae3b4d846c9abc46bab87f86bfb9cf4
ARG CPPZMQ_VERSION=v4.4.1
ARG CPPZMQ_HASH=f5b36e563598d48fcc0d82e589d3596afef945ae
RUN set -ex \
&& git clone --depth 1 -b ${CPPZMQ_VERSION} https://github.com/zeromq/cppzmq.git \
&& cd cppzmq \
&& test `git rev-parse HEAD` = ${CPPZMQ_HASH} || exit 1 \
&& mkdir /usr/local/include \
&& mv *.hpp /usr/local/include/

# Readline
ARG READLINE_VERSION=8.0
ARG READLINE_HASH=e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461
RUN set -ex \
&& curl -s -O https://ftp.gnu.org/gnu/readline/readline-${READLINE_VERSION}.tar.gz \
&& echo "${READLINE_HASH} readline-${READLINE_VERSION}.tar.gz" | sha256sum -c \
&& tar -xzf readline-${READLINE_VERSION}.tar.gz \
&& cd readline-${READLINE_VERSION} \
&& CFLAGS="-fPIC" CXXFLAGS="-fPIC" ./configure \
&& make \
&& make install
WORKDIR /usr/local

ARG NPROC
ENV CFLAGS='-fPIC'
ENV CXXFLAGS='-fPIC -DELPP_FEATURE_CRASH_LOG'

# Monero
ENV MONERO_VERSION=0.14.1.0
ENV MONERO_HASH=29a505d1c1cfd3baa7d3a0c4433db8d7b043e341
ENV MONERO_VERSION=0.15.0.0
ENV MONERO_HASH=69c488a479609df2838c14cd0cf500242758f449
RUN set -ex \
&& git clone --recursive --depth 1 -b v${MONERO_VERSION} https://github.com/monero-project/monero.git \
&& cd monero \
&& git submodule init \
&& git submodule update \
&& test `git rev-parse HEAD` = ${MONERO_HASH} || exit 1

ARG NPROC
COPY easylogging.patch /tmp/easylogging.patch
RUN set -ex \
&& cd monero \
&& patch -p1 < /tmp/easylogging.patch \
&& rm -f /tmp/easylogging.patch \
&& if [ -z "$NPROC" ] ; then export NPROC="1" ; fi \
&& export Readline_ROOT_DIR="/usr/local" \
&& nice -n 19 ionice -c2 -n7 make -j$NPROC release-static-linux-x86_64
&& test `git rev-parse HEAD` = ${MONERO_HASH} || exit 1 \
&& nice -n 19 ionice -c2 -n7 make -j${NPROC:-1} release-static-linux-x86_64


# runtime stage
FROM alpine:3.9
FROM alpine:3.10

RUN set -ex && apk add --update --no-cache \
ca-certificates \
libexecinfo \
libsodium \
ncurses-libs \
pcsc-lite-libs

Expand Down
12 changes: 0 additions & 12 deletions easylogging.patch

This file was deleted.

0 comments on commit 20ca1bc

Please sign in to comment.