mirror of
https://github.com/monero-project/monero.git
synced 2024-12-13 20:06:32 +02:00
Merge pull request #3433
b55c14c
fix sha256sum check, which requires two spaces. added set -ex to catch this, and other, errors in the future. (cornfeedhobo)
This commit is contained in:
commit
daeb3a974c
40
Dockerfile
40
Dockerfile
@ -3,7 +3,8 @@
|
|||||||
# builder stage
|
# builder stage
|
||||||
FROM ubuntu:16.04 as builder
|
FROM ubuntu:16.04 as builder
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN set -ex && \
|
||||||
|
apt-get update && \
|
||||||
apt-get --no-install-recommends --yes install \
|
apt-get --no-install-recommends --yes install \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
cmake \
|
cmake \
|
||||||
@ -24,8 +25,9 @@ WORKDIR /usr/local
|
|||||||
ARG BOOST_VERSION=1_66_0
|
ARG BOOST_VERSION=1_66_0
|
||||||
ARG BOOST_VERSION_DOT=1.66.0
|
ARG BOOST_VERSION_DOT=1.66.0
|
||||||
ARG BOOST_HASH=5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9
|
ARG BOOST_HASH=5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9
|
||||||
RUN curl -s -L -o boost_${BOOST_VERSION}.tar.bz2 https://dl.bintray.com/boostorg/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2 \
|
RUN set -ex \
|
||||||
&& echo "${BOOST_HASH} boost_${BOOST_VERSION}.tar.bz2" | sha256sum -c \
|
&& 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 \
|
&& tar -xvf boost_${BOOST_VERSION}.tar.bz2 \
|
||||||
&& cd boost_${BOOST_VERSION} \
|
&& cd boost_${BOOST_VERSION} \
|
||||||
&& ./bootstrap.sh \
|
&& ./bootstrap.sh \
|
||||||
@ -35,8 +37,9 @@ ENV BOOST_ROOT /usr/local/boost_${BOOST_VERSION}
|
|||||||
# OpenSSL
|
# OpenSSL
|
||||||
ARG OPENSSL_VERSION=1.0.2n
|
ARG OPENSSL_VERSION=1.0.2n
|
||||||
ARG OPENSSL_HASH=370babb75f278c39e0c50e8c4e7493bc0f18db6867478341a832a982fd15a8fe
|
ARG OPENSSL_HASH=370babb75f278c39e0c50e8c4e7493bc0f18db6867478341a832a982fd15a8fe
|
||||||
RUN curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
|
RUN set -ex \
|
||||||
&& echo "${OPENSSL_HASH} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c \
|
&& 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 \
|
&& tar -xzf openssl-${OPENSSL_VERSION}.tar.gz \
|
||||||
&& cd openssl-${OPENSSL_VERSION} \
|
&& cd openssl-${OPENSSL_VERSION} \
|
||||||
&& ./Configure linux-x86_64 no-shared --static -fPIC \
|
&& ./Configure linux-x86_64 no-shared --static -fPIC \
|
||||||
@ -47,7 +50,8 @@ ENV OPENSSL_ROOT_DIR=/usr/local/openssl-${OPENSSL_VERSION}
|
|||||||
# ZMQ
|
# ZMQ
|
||||||
ARG ZMQ_VERSION=v4.2.3
|
ARG ZMQ_VERSION=v4.2.3
|
||||||
ARG ZMQ_HASH=3226b8ebddd9c6c738ba42986822c26418a49afb
|
ARG ZMQ_HASH=3226b8ebddd9c6c738ba42986822c26418a49afb
|
||||||
RUN git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} \
|
RUN set -ex \
|
||||||
|
&& git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} \
|
||||||
&& cd libzmq \
|
&& cd libzmq \
|
||||||
&& test `git rev-parse HEAD` = ${ZMQ_HASH} || exit 1 \
|
&& test `git rev-parse HEAD` = ${ZMQ_HASH} || exit 1 \
|
||||||
&& ./autogen.sh \
|
&& ./autogen.sh \
|
||||||
@ -58,7 +62,8 @@ RUN git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} \
|
|||||||
|
|
||||||
# zmq.hpp
|
# zmq.hpp
|
||||||
ARG CPPZMQ_HASH=6aa3ab686e916cb0e62df7fa7d12e0b13ae9fae6
|
ARG CPPZMQ_HASH=6aa3ab686e916cb0e62df7fa7d12e0b13ae9fae6
|
||||||
RUN git clone https://github.com/zeromq/cppzmq.git -b ${ZMQ_VERSION} \
|
RUN set -ex \
|
||||||
|
&& git clone https://github.com/zeromq/cppzmq.git -b ${ZMQ_VERSION} \
|
||||||
&& cd cppzmq \
|
&& cd cppzmq \
|
||||||
&& test `git rev-parse HEAD` = ${CPPZMQ_HASH} || exit 1 \
|
&& test `git rev-parse HEAD` = ${CPPZMQ_HASH} || exit 1 \
|
||||||
&& mv *.hpp /usr/local/include
|
&& mv *.hpp /usr/local/include
|
||||||
@ -66,8 +71,9 @@ RUN git clone https://github.com/zeromq/cppzmq.git -b ${ZMQ_VERSION} \
|
|||||||
# Readline
|
# Readline
|
||||||
ARG READLINE_VERSION=7.0
|
ARG READLINE_VERSION=7.0
|
||||||
ARG READLINE_HASH=750d437185286f40a369e1e4f4764eda932b9459b5ec9a731628393dd3d32334
|
ARG READLINE_HASH=750d437185286f40a369e1e4f4764eda932b9459b5ec9a731628393dd3d32334
|
||||||
RUN curl -s -O https://ftp.gnu.org/gnu/readline/readline-${READLINE_VERSION}.tar.gz \
|
RUN set -ex \
|
||||||
&& echo "${READLINE_HASH} readline-${READLINE_VERSION}.tar.gz" | sha256sum -c \
|
&& 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 \
|
&& tar -xzf readline-${READLINE_VERSION}.tar.gz \
|
||||||
&& cd readline-${READLINE_VERSION} \
|
&& cd readline-${READLINE_VERSION} \
|
||||||
&& CFLAGS="-fPIC" CXXFLAGS="-fPIC" ./configure \
|
&& CFLAGS="-fPIC" CXXFLAGS="-fPIC" ./configure \
|
||||||
@ -77,7 +83,8 @@ RUN curl -s -O https://ftp.gnu.org/gnu/readline/readline-${READLINE_VERSION}.tar
|
|||||||
# Sodium
|
# Sodium
|
||||||
ARG SODIUM_VERSION=1.0.16
|
ARG SODIUM_VERSION=1.0.16
|
||||||
ARG SODIUM_HASH=675149b9b8b66ff44152553fb3ebf9858128363d
|
ARG SODIUM_HASH=675149b9b8b66ff44152553fb3ebf9858128363d
|
||||||
RUN git clone https://github.com/jedisct1/libsodium.git -b ${SODIUM_VERSION} \
|
RUN set -ex \
|
||||||
|
&& git clone https://github.com/jedisct1/libsodium.git -b ${SODIUM_VERSION} \
|
||||||
&& cd libsodium \
|
&& cd libsodium \
|
||||||
&& test `git rev-parse HEAD` = ${SODIUM_HASH} || exit 1 \
|
&& test `git rev-parse HEAD` = ${SODIUM_HASH} || exit 1 \
|
||||||
&& ./autogen.sh \
|
&& ./autogen.sh \
|
||||||
@ -90,13 +97,18 @@ WORKDIR /src
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
ARG NPROC
|
ARG NPROC
|
||||||
RUN rm -rf build && \
|
RUN set -ex && \
|
||||||
if [ -z "$NPROC" ];then make -j$(nproc) release-static;else make -j$NPROC release-static;fi
|
rm -rf build && \
|
||||||
|
if [ -z "$NPROC" ] ; \
|
||||||
|
then make -j$(nproc) release-static ; \
|
||||||
|
else make -j$NPROC release-static ; \
|
||||||
|
fi
|
||||||
|
|
||||||
# runtime stage
|
# runtime stage
|
||||||
FROM ubuntu:16.04
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN set -ex && \
|
||||||
|
apt-get update && \
|
||||||
apt-get --no-install-recommends --yes install ca-certificates && \
|
apt-get --no-install-recommends --yes install ca-certificates && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt
|
rm -rf /var/lib/apt
|
||||||
@ -114,4 +126,4 @@ VOLUME /wallet
|
|||||||
EXPOSE 18080
|
EXPOSE 18080
|
||||||
EXPOSE 18081
|
EXPOSE 18081
|
||||||
|
|
||||||
ENTRYPOINT ["monerod", "--p2p-bind-ip=0.0.0.0", "--p2p-bind-port=18080", "--rpc-bind-ip=0.0.0.0", "--rpc-bind-port=18081", "--non-interactive", "--confirm-external-bind"]
|
ENTRYPOINT ["monerod", "--p2p-bind-ip=0.0.0.0", "--p2p-bind-port=18080", "--rpc-bind-ip=0.0.0.0", "--rpc-bind-port=18081", "--non-interactive", "--confirm-external-bind"]
|
||||||
|
Loading…
Reference in New Issue
Block a user