updated Dockerfile

- minified image: 75% smaller image
- statically-linked build
- add .dockerignore: no need to send repo to build context
pull/95/head
Mine Coins 7 years ago
parent d666339853
commit a1cd4db4e6

@ -1,40 +1,35 @@
FROM debian:testing FROM ubuntu:16.04
MAINTAINER eiabea <developer@eiabea.com>
ENV SRC_DIR /usr/local/src/monero
# Install clone dependencies
RUN set -e && \ RUN set -x \
apt-get update -q && \ && buildDeps=' \
apt-get install -q -y --no-install-recommends ca-certificates git && \ ca-certificates \
git clone https://github.com/monero-project/monero.git src && \ cmake \
apt-get purge -y git && \ g++ \
apt-get clean -q -y && \ git \
apt-get autoclean -q -y && \ libboost1.58-all-dev \
apt-get autoremove -q -y libssl-dev \
make \
WORKDIR /src pkg-config \
' \
# Install make dependencies && apt-get -qq update \
RUN set -e && \ && apt-get -qq --no-install-recommends install $buildDeps \
apt-get update -q && \ \
apt-get install -q -y --no-install-recommends build-essential ca-certificates g++ gcc cmake \ && git clone https://github.com/monero-project/monero.git $SRC_DIR \
pkg-config libunbound2 libevent-2.0-5 libgtest-dev libboost-all-dev libdb5.3++-dev libdb5.3-dev libssl1.0-dev && \ && cd $SRC_DIR \
make -j 4 && \ && make -j$(nproc) release-static \
apt-get purge -y g++ gcc cmake pkg-config && \ && cp build/release/bin/* /usr/local/bin/ \
apt-get clean -q -y && \ \
apt-get autoclean -q -y && \ && rm -r $SRC_DIR \
apt-get autoremove -q -y && \ && apt-get -qq --auto-remove purge $buildDeps
mkdir /monero && \
mv /src/build/release/bin/* /monero && \
rm -rf /src
WORKDIR /monero
# Contains the blockchain # Contains the blockchain
VOLUME /root/.bitmonero VOLUME /root/.bitmonero
# Generate your wallet via accessing the container and run: # Generate your wallet via accessing the container and run:
# cd /wallet # cd /wallet
# /./bitmonero/monero-wallet-cli # monero-wallet-cli
VOLUME /wallet VOLUME /wallet
ENV LOG_LEVEL 0 ENV LOG_LEVEL 0
@ -46,4 +41,4 @@ ENV RPC_BIND_PORT 18081
EXPOSE 18080 EXPOSE 18080
EXPOSE 18081 EXPOSE 18081
CMD ./monerod --log-level=$LOG_LEVEL --p2p-bind-ip=$P2P_BIND_IP --p2p-bind-port=$P2P_BIND_PORT --rpc-bind-ip=$RPC_BIND_IP --rpc-bind-port=$RPC_BIND_PORT CMD monerod --log-level=$LOG_LEVEL --p2p-bind-ip=$P2P_BIND_IP --p2p-bind-port=$P2P_BIND_PORT --rpc-bind-ip=$RPC_BIND_IP --rpc-bind-port=$RPC_BIND_PORT

Loading…
Cancel
Save