Skip to content

Commit

Permalink
Re-add Dockerfiles to trigger first time ci run
Browse files Browse the repository at this point in the history
This reverts commit 08cf7e1.
  • Loading branch information
binarybaron committed Sep 5, 2024
1 parent 08cf7e1 commit 6695950
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 0 deletions.
37 changes: 37 additions & 0 deletions bitcoin-core/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM debian:bullseye-slim AS install

ARG VRS
ENV VERSION=${VRS:-23.0}
RUN echo $VERSION

RUN apt update && apt install -y wget gpg
# Get the public key to verify signatures
RUN gpg --keyserver keys.openpgp.org --recv-keys 9DEAE0DC7063249FB05474681E4AED62986CD25D
RUN gpg --keyserver keys.openpgp.org --recv-keys 74E2DEF5D77260B98BC19438099BAD163C70FBFA
RUN gpg --keyserver keys.openpgp.org --recv-keys 152812300785C96444D3334D17565732E08E5E41
# Get bins, hashes, and signatures
RUN wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/bitcoin-$VERSION-x86_64-linux-gnu.tar.gz\
&& wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/SHA256SUMS\
&& wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/SHA256SUMS.asc
# Verify bins and signatures
RUN gpg --verify SHA256SUMS.asc SHA256SUMS 2>&1 | grep "Good signature"

RUN sha256sum --ignore-missing --check SHA256SUMS
RUN tar xzf bitcoin-$VERSION-x86_64-linux-gnu.tar.gz
RUN install -m 0755 -o root -g root -t /usr/bin bitcoin-$VERSION/bin/*

FROM debian:bullseye-slim

COPY --from=install /usr/bin/bitcoind /usr/bin/bitcoind
COPY --from=install /usr/bin/bitcoin-cli /usr/bin/bitcoin-cli

# Default RPC ports: bitcoin, testnet, regtest, signet
EXPOSE 8332 18332 18443 38332
# Default P2P ports: bitcoin, testnet, regtest, signet
EXPOSE 8333 18333 18444 38333

VOLUME /data

LABEL "org.opencontainers.image.description"="A ready to use bitcoin-core image suited for CI and tests."

CMD ["sh", "-c", "/usr/bin/bitcoind -chain=$NETWORK -server -rest -txindex -rpcbind=0.0.0.0 -rpcallowip=0.0.0.0/0 -fallbackfee=0.00001 -datadir=/data"]
28 changes: 28 additions & 0 deletions electrs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM rust:latest AS install

ARG VRS
ENV VERSION=${VRS:-v0.9.9}
RUN echo $VERSION

RUN apt update && apt install -y clang cmake

RUN git clone https://github.com/romanz/electrs && cd electrs && git checkout ${VERSION}

WORKDIR /electrs

RUN cargo build --release --bin electrs

FROM debian:bullseye-slim

COPY --from=install /electrs/target/release/electrs /usr/bin/electrs

# Default electrum ports: bitcoin, testnet, regtest, signet
EXPOSE 50001 60001 60401 60601
# Default electrs monitoring ports: bitcoin, testnet, regtest, signet
EXPOSE 4224 14224 24224 34224

VOLUME /data

LABEL "org.opencontainers.image.description"="A ready to use electrs image suited for CI and tests with containers/bitcoin-core."

CMD ["sh", "-c", "/usr/bin/electrs --log-filters INFO --network $NETWORK --daemon-dir /data --daemon-rpc-addr $DAEMON_RPC_ADDR --daemon-p2p-addr $DAEMON_P2P_ADDR --electrum-rpc-addr 0.0.0.0:$ELECTRUM_RPC_PORT"]
84 changes: 84 additions & 0 deletions monero-lws/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
FROM ubuntu:20.04 AS install

ARG TAG
ENV MNRTAG=${TAG:-0.18.1.2}
RUN echo $MNRTAG

RUN apt update && apt install -y git
RUN DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends --yes install \
automake \
autotools-dev \
bsdmainutils \
build-essential \
ca-certificates \
ccache \
cmake \
curl \
git \
libtool \
pkg-config \
gperf \
libboost-chrono-dev \
libboost-date-time-dev \
libboost-filesystem-dev \
libboost-locale-dev \
libboost-program-options-dev \
libboost-regex-dev \
libboost-serialization-dev \
libboost-system-dev \
libboost-thread-dev \
libssl-dev \
libzmq3-dev \
libpgm-dev \
libunbound-dev \
libsodium-dev

# build monero
RUN git clone https://github.com/monero-project/monero && \
cd monero && \
git checkout v$MNRTAG && \
git submodule init && git submodule update && \
mkdir build && cd build && \
cmake -DCMAKE_CXX_FLAGS="-mno-avx512f" -DCMAKE_C_FLAGS="-mno-avx512f" .. && \
make -j$(nproc)

# build monero-lws
RUN git clone https://github.com/TheCharlatan/monero-lws && \
cd ../monero-lws && \
git checkout changes_v0.18 && \
mkdir build && cd build && \
cmake -DMONERO_SOURCE_DIR=/monero -DMONERO_BUILD_DIR=/monero/build .. && \
make && \
make install

# separate deployment container
FROM ubuntu:20.04

COPY --from=install /usr/local/bin/monero* /usr/bin/

# install shared libraries
RUN apt update
RUN DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends --yes install \
libboost-chrono-dev \
libboost-date-time-dev \
libboost-filesystem-dev \
libboost-locale-dev \
libboost-program-options-dev \
libboost-regex-dev \
libboost-serialization-dev \
libboost-system-dev \
libboost-thread-dev \
libssl-dev \
libzmq3-dev \
libpgm-dev \
libunbound-dev \
libsodium-dev

# Rest server listening port
EXPOSE 38884

RUN mkdir /data

LABEL "org.opencontainers.image.description"="An image of a modified monero-lws suited for CI and tests."

CMD ["sh", "-c", "/usr/bin/monero-lws-daemon --network $NETWORK --daemon tcp://$MONERO_DAEMON_ADDRESS --confirm-external-bind --rest-server http://0.0.0.0:38884 --auto-accept-requests --db-path /data"]
26 changes: 26 additions & 0 deletions monero-wallet-rpc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM debian:bullseye-slim AS install

ARG VRS
ENV VERSION=${VRS:-v0.18.2.2}
RUN echo $VERSION

RUN apt update && apt install -y wget tar bzip2
# Get bins and signatures
RUN wget https://downloads.getmonero.org/cli/monero-linux-x64-$VERSION.tar.bz2
COPY SHASUM ./
RUN echo "$(head -n 1 ./SHASUM) monero-linux-x64-$VERSION.tar.bz2" | sha256sum -c

# Extract and install binaries
RUN tar xf monero-linux-x64-$VERSION.tar.bz2
RUN install -m 0755 -o root -g root -t /usr/bin monero-x86_64-linux-gnu-$VERSION/monero*

FROM debian:bullseye-slim

COPY --from=install /usr/bin/monero-wallet* /usr/bin/

# Default monero wallet-rpc ports: monero, testnet, stagenet; regtest should use same as mainnet
EXPOSE 18083 28083 38083

LABEL "org.opencontainers.image.description"="A ready to use monero wallet-rpc image suited for CI and tests."

CMD ["sh", "-c", "/usr/bin/monero-wallet-rpc --disable-rpc-login --wallet-dir wallets --daemon-address $MONERO_DAEMON_ADDRESS --rpc-bind-ip 0.0.0.0 --rpc-bind-port $WALLET_RPC_PORT --confirm-external-bind --trusted-daemon --allow-mismatched-daemon-version"]
30 changes: 30 additions & 0 deletions monerod/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM debian:bullseye-slim AS install

ARG VRS
ENV VERSION=${VRS:-v0.18.2.2}
RUN echo $VERSION

RUN apt update && apt install -y wget tar bzip2
# Get bins and signatures
RUN wget https://downloads.getmonero.org/cli/monero-linux-x64-$VERSION.tar.bz2
COPY SHASUM ./
RUN echo "$(head -n 1 ./SHASUM) monero-linux-x64-$VERSION.tar.bz2" | sha256sum -c

# Extract and install binaries
RUN tar xf monero-linux-x64-$VERSION.tar.bz2
RUN install -m 0755 -o root -g root -t /usr/bin monero-x86_64-linux-gnu-$VERSION/monero*

FROM debian:bullseye-slim

COPY --from=install /usr/bin/monero* /usr/bin/

# Monero default p2p ports: monero, testnet, stagenet
EXPOSE 18080 28080 38080
# Monero default rpc ports: monero, testnet, stagenet
EXPOSE 18081 28081 38081
# Monero default zmq ports: monero, testnet, stagenet
EXPOSE 18082 28082 38082

LABEL "org.opencontainers.image.description"="A ready to use monerod image suited for CI and tests."

CMD ["sh", "-c", "/usr/bin/monerod --$NETWORK --p2p-bind-ip 0.0.0.0 --rpc-bind-ip 0.0.0.0 --zmq-rpc-bind-ip 0.0.0.0 --confirm-external-bind --non-interactive $OFFLINE --fixed-difficulty $DIFFICULTY"]

0 comments on commit 6695950

Please sign in to comment.