2017-11-17 06:14:19 +02:00
|
|
|
# Multistage docker build, requires docker 17.05
|
|
|
|
|
|
|
|
# builder stage
|
|
|
|
FROM ubuntu:16.04 as builder
|
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get --no-install-recommends --yes install \
|
|
|
|
ca-certificates \
|
|
|
|
cmake \
|
|
|
|
g++ \
|
|
|
|
libboost1.58-all-dev \
|
|
|
|
libssl-dev \
|
2017-11-18 08:45:39 +02:00
|
|
|
libzmq3-dev \
|
|
|
|
libreadline-dev \
|
|
|
|
libsodium-dev \
|
2017-11-17 06:14:19 +02:00
|
|
|
make \
|
|
|
|
pkg-config \
|
|
|
|
graphviz \
|
|
|
|
doxygen \
|
|
|
|
git
|
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
COPY . .
|
2017-12-12 01:33:08 +02:00
|
|
|
|
|
|
|
ARG NPROC
|
2017-11-17 06:14:19 +02:00
|
|
|
RUN rm -rf build && \
|
2017-12-12 01:33:08 +02:00
|
|
|
if [ -z "$NPROC" ];then make -j$(nproc) release-static;else make -j$NPROC release-static;fi
|
2017-11-17 06:14:19 +02:00
|
|
|
|
|
|
|
# runtime stage
|
2017-02-24 00:55:37 +02:00
|
|
|
FROM ubuntu:16.04
|
|
|
|
|
2017-11-17 06:14:19 +02:00
|
|
|
RUN apt-get update && \
|
2017-11-18 08:45:39 +02:00
|
|
|
apt-get --no-install-recommends --yes install ca-certificates && \
|
2017-11-17 06:14:19 +02:00
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt
|
|
|
|
|
|
|
|
COPY --from=builder /src/build/release/bin/* /usr/local/bin/
|
2016-08-31 19:10:44 +03:00
|
|
|
|
|
|
|
# Contains the blockchain
|
|
|
|
VOLUME /root/.bitmonero
|
|
|
|
|
|
|
|
# Generate your wallet via accessing the container and run:
|
|
|
|
# cd /wallet
|
2017-02-24 00:55:37 +02:00
|
|
|
# monero-wallet-cli
|
2016-08-31 19:10:44 +03:00
|
|
|
VOLUME /wallet
|
|
|
|
|
|
|
|
EXPOSE 18080
|
|
|
|
EXPOSE 18081
|
|
|
|
|
2017-12-14 23:07:12 +02:00
|
|
|
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"]
|