Skip to content

Commit

Permalink
Lower-case repository name
Browse files Browse the repository at this point in the history
  • Loading branch information
binarybaron committed Sep 5, 2024
1 parent 08cf7e1 commit 90f39ac
Show file tree
Hide file tree
Showing 16 changed files with 250 additions and 45 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/bitcoin-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions .github/workflows/electrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions .github/workflows/monero-lws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions .github/workflows/monero-wallet-rpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions .github/workflows/monerod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand All @@ -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
Expand Down
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"]
6 changes: 3 additions & 3 deletions bitcoin-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
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"]
14 changes: 7 additions & 7 deletions electrs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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\
Expand All @@ -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
Expand Down
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"]
14 changes: 7 additions & 7 deletions monero-lws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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"]
Loading

0 comments on commit 90f39ac

Please sign in to comment.