diff --git a/.github/workflows/bitcoin-core.yml b/.github/workflows/bitcoin-core.yml index c9cc82d..c3a564c 100644 --- a/.github/workflows/bitcoin-core.yml +++ b/.github/workflows/bitcoin-core.yml @@ -28,9 +28,9 @@ jobs: echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Docker build - run: docker build --build-arg VRS=${VERSION} -f $GITHUB_WORKSPACE/bitcoin-core/Dockerfile -t ghcr.io/UnstoppableSwap/containers/bitcoin-core:latest -t ghcr.io/UnstoppableSwap/containers/bitcoin-core:${VERSION} $GITHUB_WORKSPACE/bitcoin-core + run: docker build --build-arg VRS=${VERSION} -f $GITHUB_WORKSPACE/bitcoin-core/Dockerfile -t ghcr.io/unstoppableswap/containers/bitcoin-core:latest -t ghcr.io/unstoppableswap/containers/bitcoin-core:${VERSION} $GITHUB_WORKSPACE/bitcoin-core - name: Docker push to GitHub Packages run: | - docker push ghcr.io/UnstoppableSwap/containers/bitcoin-core:$VERSION - docker push ghcr.io/UnstoppableSwap/containers/bitcoin-core:latest + docker push ghcr.io/unstoppableswap/containers/bitcoin-core:$VERSION + docker push ghcr.io/unstoppableswap/containers/bitcoin-core:latest diff --git a/.github/workflows/electrs.yml b/.github/workflows/electrs.yml index 2f2c398..c87e4d0 100644 --- a/.github/workflows/electrs.yml +++ b/.github/workflows/electrs.yml @@ -28,9 +28,9 @@ jobs: echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Docker build - run: docker build --build-arg VRS=v${VERSION} -f $GITHUB_WORKSPACE/electrs/Dockerfile -t ghcr.io/UnstoppableSwap/containers/electrs:latest -t ghcr.io/UnstoppableSwap/containers/electrs:${VERSION} $GITHUB_WORKSPACE/electrs + run: docker build --build-arg VRS=v${VERSION} -f $GITHUB_WORKSPACE/electrs/Dockerfile -t ghcr.io/unstoppableswap/containers/electrs:latest -t ghcr.io/unstoppableswap/containers/electrs:${VERSION} $GITHUB_WORKSPACE/electrs - name: Docker push to GitHub Packages run: | - docker push ghcr.io/UnstoppableSwap/containers/electrs:$VERSION - docker push ghcr.io/UnstoppableSwap/containers/electrs:latest + docker push ghcr.io/unstoppableswap/containers/electrs:$VERSION + docker push ghcr.io/unstoppableswap/containers/electrs:latest diff --git a/.github/workflows/monero-lws.yml b/.github/workflows/monero-lws.yml index b0f2099..52bf401 100644 --- a/.github/workflows/monero-lws.yml +++ b/.github/workflows/monero-lws.yml @@ -28,9 +28,9 @@ jobs: echo "TAG=$TAG" >> $GITHUB_ENV - name: Docker build - run: docker build --build-arg TAG=${TAG} -f $GITHUB_WORKSPACE/monero-lws/Dockerfile -t ghcr.io/UnstoppableSwap/containers/monero-lws:monerod-${TAG} -t ghcr.io/UnstoppableSwap/containers/monero-lws:latest $GITHUB_WORKSPACE/monero-lws + run: docker build --build-arg TAG=${TAG} -f $GITHUB_WORKSPACE/monero-lws/Dockerfile -t ghcr.io/unstoppableswap/containers/monero-lws:monerod-${TAG} -t ghcr.io/unstoppableswap/containers/monero-lws:latest $GITHUB_WORKSPACE/monero-lws - name: Docker push to GitHub Packages run: | - docker push ghcr.io/UnstoppableSwap/containers/monero-lws:monerod-${TAG} - docker push ghcr.io/UnstoppableSwap/containers/monero-lws:latest + docker push ghcr.io/unstoppableswap/containers/monero-lws:monerod-${TAG} + docker push ghcr.io/unstoppableswap/containers/monero-lws:latest diff --git a/.github/workflows/monero-wallet-rpc.yml b/.github/workflows/monero-wallet-rpc.yml index e46e185..a40f0e0 100644 --- a/.github/workflows/monero-wallet-rpc.yml +++ b/.github/workflows/monero-wallet-rpc.yml @@ -29,9 +29,9 @@ jobs: echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Docker build - run: docker build --build-arg VRS=v${VERSION} -f $GITHUB_WORKSPACE/monero-wallet-rpc/Dockerfile -t ghcr.io/UnstoppableSwap/containers/monero-wallet-rpc:latest -t ghcr.io/UnstoppableSwap/containers/monero-wallet-rpc:${VERSION} $GITHUB_WORKSPACE/monero-wallet-rpc + run: docker build --build-arg VRS=v${VERSION} -f $GITHUB_WORKSPACE/monero-wallet-rpc/Dockerfile -t ghcr.io/unstoppableswap/containers/monero-wallet-rpc:latest -t ghcr.io/unstoppableswap/containers/monero-wallet-rpc:${VERSION} $GITHUB_WORKSPACE/monero-wallet-rpc - name: Docker push to GitHub Packages run: | - docker push ghcr.io/UnstoppableSwap/containers/monero-wallet-rpc:$VERSION - docker push ghcr.io/UnstoppableSwap/containers/monero-wallet-rpc:latest + docker push ghcr.io/unstoppableswap/containers/monero-wallet-rpc:$VERSION + docker push ghcr.io/unstoppableswap/containers/monero-wallet-rpc:latest diff --git a/.github/workflows/monerod.yml b/.github/workflows/monerod.yml index b3319c2..071f8b4 100644 --- a/.github/workflows/monerod.yml +++ b/.github/workflows/monerod.yml @@ -29,9 +29,9 @@ jobs: echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Docker build - run: docker build --build-arg VRS=v${VERSION} -f $GITHUB_WORKSPACE/monerod/Dockerfile -t ghcr.io/UnstoppableSwap/containers/monerod:latest -t ghcr.io/UnstoppableSwap/containers/monerod:${VERSION} $GITHUB_WORKSPACE/monerod + run: docker build --build-arg VRS=v${VERSION} -f $GITHUB_WORKSPACE/monerod/Dockerfile -t ghcr.io/unstoppableswap/containers/monerod:latest -t ghcr.io/unstoppableswap/containers/monerod:${VERSION} $GITHUB_WORKSPACE/monerod - name: Docker push to GitHub Packages run: | - docker push ghcr.io/UnstoppableSwap/containers/monerod:$VERSION - docker push ghcr.io/UnstoppableSwap/containers/monerod:latest + docker push ghcr.io/unstoppableswap/containers/monerod:$VERSION + docker push ghcr.io/unstoppableswap/containers/monerod:latest diff --git a/README.md b/README.md index 395c9cd..ac1205a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Containers -A list of Docker images built for supporting **@UnstoppableSwap** integration tests and help bootstrapping a swap environment. +A list of Docker images built for supporting **@unstoppableswap** integration tests and help bootstrapping a swap environment. - **bitcoin-core**: [`bitcoin-core` image](./bitcoin-core/) - **electrs**: [`electrs` image](./electrs/) @@ -19,7 +19,7 @@ The later support adding `services` to a `job` described in yaml format, the doc To be able to reuse these images in other contexts no `ENTRYPOINT` is specified. Containers can be created by changing the `CMD` argument, e.g. ``` -docker run --rm ghcr.io/UnstoppableSwap/containers/bitcoin-core:latest /usr/bin/bitcoind\ +docker run --rm ghcr.io/unstoppableswap/containers/bitcoin-core:latest /usr/bin/bitcoind\ -testnet\ -server\ -rest diff --git a/bitcoin-core/Dockerfile b/bitcoin-core/Dockerfile new file mode 100644 index 0000000..1d3ced9 --- /dev/null +++ b/bitcoin-core/Dockerfile @@ -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"] diff --git a/bitcoin-core/README.md b/bitcoin-core/README.md index 00e3c9e..dbb7fbc 100644 --- a/bitcoin-core/README.md +++ b/bitcoin-core/README.md @@ -43,7 +43,7 @@ Add a service named `bitcoind` with a named volume `bitcoind-data` mounted on `/ ```yaml services: bitcoind: - image: ghcr.io/UnstoppableSwap/containers/bitcoin-core:23.0 + image: ghcr.io/unstoppableswap/containers/bitcoin-core:23.0 env: NETWORK: regtest volumes: @@ -60,14 +60,14 @@ You probably also want to run the job in a container to bind the same named volu Pull the image, create a named volume, and finally create the container (here named `bitcoind`). ``` -docker pull ghcr.io/UnstoppableSwap/containers/bitcoin-core:23.0 +docker pull ghcr.io/unstoppableswap/containers/bitcoin-core:23.0 mkdir data docker create -p 18443:18443 -p 18444:18444\ --name bitcoind\ --env NETWORK=regtest\ -v $(pwd)/data:/data\ - ghcr.io/UnstoppableSwap/containers/bitcoin-core:23.0 + ghcr.io/unstoppableswap/containers/bitcoin-core:23.0 docker start bitcoind sudo cat data/regtest/.cookie diff --git a/electrs/Dockerfile b/electrs/Dockerfile new file mode 100644 index 0000000..52bade2 --- /dev/null +++ b/electrs/Dockerfile @@ -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"] diff --git a/electrs/README.md b/electrs/README.md index 1e0ac23..596ac54 100644 --- a/electrs/README.md +++ b/electrs/README.md @@ -44,13 +44,13 @@ Available listening container ports: ```yaml services: bitcoind: - image: ghcr.io/UnstoppableSwap/containers/bitcoin-core:23.0 + image: ghcr.io/unstoppableswap/containers/bitcoin-core:23.0 env: NETWORK: regtest volumes: - bitcoind-data:/data electrs: - image: ghcr.io/UnstoppableSwap/containers/electrs:0.9.9 + image: ghcr.io/unstoppableswap/containers/electrs:0.9.9 env: NETWORK: regtest DAEMON_RPC_ADDR: bitcoind:18443 @@ -60,18 +60,18 @@ services: - bitcoind-data:/data ``` -## Standalone usage with [`containers/bitcoin-core`](https://github.com/UnstoppableSwap/containers/tree/main/bitcoin-core) image +## Standalone usage with [`containers/bitcoin-core`](https://github.com/unstoppableswap/containers/tree/main/bitcoin-core) image ``` -docker pull ghcr.io/UnstoppableSwap/containers/bitcoin-core:23.0 -docker pull ghcr.io/UnstoppableSwap/containers/electrs:0.9.9 +docker pull ghcr.io/unstoppableswap/containers/bitcoin-core:23.0 +docker pull ghcr.io/unstoppableswap/containers/electrs:0.9.9 docker volume create --name bitcoind-data docker create -p 18443:18443 -p 18444:18444\ --name bitcoind\ --env NETWORK=regtest\ -v bitcoind-data:/data\ - ghcr.io/UnstoppableSwap/containers/bitcoin-core:23.0 + ghcr.io/unstoppableswap/containers/bitcoin-core:23.0 docker create -p 60401:60401\ --name electrs\ @@ -81,7 +81,7 @@ docker create -p 60401:60401\ --env NETWORK=regtest\ --volumes-from bitcoind\ --link bitcoind\ - ghcr.io/UnstoppableSwap/containers/electrs:0.9.9 + ghcr.io/unstoppableswap/containers/electrs:0.9.9 docker start bitcoind docker start electrs diff --git a/monero-lws/Dockerfile b/monero-lws/Dockerfile new file mode 100644 index 0000000..394d0e6 --- /dev/null +++ b/monero-lws/Dockerfile @@ -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"] diff --git a/monero-lws/README.md b/monero-lws/README.md index 844c320..ca5afc6 100644 --- a/monero-lws/README.md +++ b/monero-lws/README.md @@ -37,37 +37,37 @@ Incoming connections are accepted on `http://0.0.0.0:38884`, if you want to expo ```yaml services: monerod: - image: ghcr.io/UnstoppableSwap/containers/monerod:0.18.1.2 + image: ghcr.io/unstoppableswap/containers/monerod:0.18.1.2 env: NETWORK: regtest OFFLINE: --offline DIFFICULTY: 1 monero-lws: - image: ghcr.io/UnstoppableSwap/containers/monero-lws:monerod-0.18.1.2 + image: ghcr.io/unstoppableswap/containers/monero-lws:monerod-0.18.1.2 env: NETWORK: main MONERO_DAEMON_ADDRESS: monerod:18082 ``` -## Standalone usage with [containers/monerod](https://github.com/UnstoppableSwap/containers/tree/main/monerod) image +## Standalone usage with [containers/monerod](https://github.com/unstoppableswap/containers/tree/main/monerod) image ``` -docker pull ghcr.io/UnstoppableSwap/containers/monerod:0.18.1.2 -docker pull ghcr.io/UnstoppableSwap/containers/monero-lws:monerod-0.18.1.2 +docker pull ghcr.io/unstoppableswap/containers/monerod:0.18.1.2 +docker pull ghcr.io/unstoppableswap/containers/monero-lws:monerod-0.18.1.2 docker create -p 18080:18080 -p 18081:18081 -p 18082:18082\ --name monerod\ --env NETWORK=regtest\ --env OFFLINE=--offline\ --env DIFFICULTY=1\ - ghcr.io/UnstoppableSwap/containers/monerod:0.18.1.2 + ghcr.io/unstoppableswap/containers/monerod:0.18.1.2 docker create -p 38884:38884\ --name monero-lws\ --env MONERO_DAEMON_ADDRESS=monerod:18082\ --env NETWORK=main\ --link monerod\ - ghcr.io/UnstoppableSwap/containers/monero-lws:monerod-0.18.1.2 + ghcr.io/unstoppableswap/containers/monero-lws:monerod-0.18.1.2 docker start monerod docker start monero-lws diff --git a/monero-wallet-rpc/Dockerfile b/monero-wallet-rpc/Dockerfile new file mode 100644 index 0000000..f9ba360 --- /dev/null +++ b/monero-wallet-rpc/Dockerfile @@ -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"] diff --git a/monero-wallet-rpc/README.md b/monero-wallet-rpc/README.md index 02b0fa9..98a9a75 100644 --- a/monero-wallet-rpc/README.md +++ b/monero-wallet-rpc/README.md @@ -32,44 +32,44 @@ Available listening container ports: Wallet RPC is binded to `0.0.0.0` and the chosen **WALLET_RPC_PORT**, you probably want to expose the chosen port outside the container with `-p [hostPort]:[containerPort]`. -The `monero-wallet-cli` binary is also installed, you can use `docker run -it ghcr.io/UnstoppableSwap/containers/monero-wallet-rpc:0.18.2.2 /bin/bash` to use it stand alone or `docker exec -it {monero-wallet-rcp} /bin/bash` to enter a running container. +The `monero-wallet-cli` binary is also installed, you can use `docker run -it ghcr.io/unstoppableswap/containers/monero-wallet-rpc:0.18.2.2 /bin/bash` to use it stand alone or `docker exec -it {monero-wallet-rcp} /bin/bash` to enter a running container. ## GitHub Action usage ```yaml services: monerod: - image: ghcr.io/UnstoppableSwap/containers/monerod:0.18.2.2 + image: ghcr.io/unstoppableswap/containers/monerod:0.18.2.2 env: NETWORK: regtest OFFLINE: --offline DIFFICULTY: 1 monero-wallet-rpc: - image: ghcr.io/UnstoppableSwap/containers/monero-wallet-rpc:0.18.2.2 + image: ghcr.io/unstoppableswap/containers/monero-wallet-rpc:0.18.2.2 env: MONERO_DAEMON_ADDRESS: monerod:18081 WALLET_RPC_PORT: 18083 ``` -## Standalone usage with [`containers/monerod`](https://github.com/UnstoppableSwap/containers/tree/main/monerod) image +## Standalone usage with [`containers/monerod`](https://github.com/unstoppableswap/containers/tree/main/monerod) image ``` -docker pull ghcr.io/UnstoppableSwap/containers/monerod:0.18.2.2 -docker pull ghcr.io/UnstoppableSwap/containers/monero-wallet-rpc:0.18.2.2 +docker pull ghcr.io/unstoppableswap/containers/monerod:0.18.2.2 +docker pull ghcr.io/unstoppableswap/containers/monero-wallet-rpc:0.18.2.2 docker create -p 18080:18080 -p 18081:18081 -p 18082:18082\ --name monerod\ --env NETWORK=regtest\ --env OFFLINE=--offline\ --env DIFFICULTY=1\ - ghcr.io/UnstoppableSwap/containers/monerod:0.18.2.2 + ghcr.io/unstoppableswap/containers/monerod:0.18.2.2 docker create -p 18083:18083\ --name monero-wallet-rpc\ --link monerod\ --env MONERO_DAEMON_ADDRESS=monerod:18081\ --env WALLET_RPC_PORT=18083\ - ghcr.io/UnstoppableSwap/containers/monero-wallet-rpc:0.18.2.2 + ghcr.io/unstoppableswap/containers/monero-wallet-rpc:0.18.2.2 docker start monerod docker start monero-wallet-rpc diff --git a/monerod/Dockerfile b/monerod/Dockerfile new file mode 100644 index 0000000..33c62c0 --- /dev/null +++ b/monerod/Dockerfile @@ -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"] diff --git a/monerod/README.md b/monerod/README.md index 089026c..feb6902 100644 --- a/monerod/README.md +++ b/monerod/README.md @@ -44,7 +44,7 @@ RPC and Zero MQ are binded to `0.0.0.0` to accept any connections, you probably ```yaml services: monerod: - image: ghcr.io/UnstoppableSwap/containers/monerod:0.18.2.2 + image: ghcr.io/unstoppableswap/containers/monerod:0.18.2.2 env: NETWORK: regtest OFFLINE: --offline @@ -58,13 +58,13 @@ services: ## Standalone usage ``` -docker pull ghcr.io/UnstoppableSwap/containers/monerod:0.18.2.2 +docker pull ghcr.io/unstoppableswap/containers/monerod:0.18.2.2 docker create -p 18080:18080 -p 18081:18081 -p 18082:18082\ --name monerod\ --env NETWORK=regtest\ --env OFFLINE=--offline\ --env DIFFICULTY=1\ - ghcr.io/UnstoppableSwap/containers/monerod:0.18.2.2 + ghcr.io/unstoppableswap/containers/monerod:0.18.2.2 docker start monerod