From 60a31777100e72fdba408549a228a599eac483e8 Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Tue, 16 Jul 2024 10:43:47 +0200 Subject: [PATCH 01/11] feat: Dockerfile for asb --- Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..7f7dddaf --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM rust:1.74 AS builder + +WORKDIR /build + +RUN apt-get update +RUN apt-get install -y git clang cmake libsnappy-dev + +RUN git clone https://github.com/comit-network/xmr-btc-swap . + +RUN cargo build --release --bin=asb + +FROM debian:bullseye-slim + +WORKDIR /data + +COPY --from=builder /build/target/release/asb /bin/asb + +ENTRYPOINT ["asb"] From d55c6e8c1acf4a10329edcb531799e97743937bd Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:11:40 +0200 Subject: [PATCH 02/11] fix(Dockerfile): Use local repo --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7f7dddaf..2dbf5397 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -FROM rust:1.74 AS builder +FROM rust:1.59-slim AS builder WORKDIR /build RUN apt-get update RUN apt-get install -y git clang cmake libsnappy-dev -RUN git clone https://github.com/comit-network/xmr-btc-swap . +COPY . . RUN cargo build --release --bin=asb From eab4b0047835a50712c139627e304dd4d457a9f3 Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:19:56 +0200 Subject: [PATCH 03/11] feat: Release Docker image on build --- .github/workflows/build-release-binaries.yml | 34 +++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index 662e3a5e..565d2dbd 100644 --- a/.github/workflows/build-release-binaries.yml +++ b/.github/workflows/build-release-binaries.yml @@ -4,6 +4,9 @@ on: release: types: [created] +env: + DOCKER_IMAGE_NAME: unstoppableswap/asb + jobs: build_binaries: name: Build @@ -82,7 +85,7 @@ jobs: run: target/${{ matrix.target }}/release/${{ matrix.bin }} --help - id: create-archive-name - shell: python # Use python to have a prettier name for the archive on Windows. + shell: python run: | import platform os_info = platform.uname() @@ -122,3 +125,32 @@ jobs: asset_path: ./${{ steps.create-archive-name.outputs.archive }} asset_name: ${{ steps.create-archive-name.outputs.archive }} asset_content_type: application/gzip + + build_and_push_docker: + name: Build and Push Docker Image + runs-on: ubuntu-latest + needs: build_binaries + steps: + - name: Checkout code + uses: actions/checkout@v4.1.7 + with: + ref: ${{ github.event.release.target_commitish }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + file: ./Dockerfile + push: true + tags: | + ${{ env.DOCKER_IMAGE_NAME }}:latest + ${{ env.DOCKER_IMAGE_NAME }}:${{ github.event.release.tag_name }} From c430e89502ae06e888d8482e21a0db11c437132d Mon Sep 17 00:00:00 2001 From: UnstoppableSwap Botty Date: Tue, 16 Jul 2024 09:25:28 +0000 Subject: [PATCH 04/11] Prepare release 0.13.3 --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96a59b5f..9ef7653e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.13.3] - 2024-07-16 + ## [0.13.3] - 2024-07-15 - Introduced a cooperative Monero redeem feature for Bob to request from Alice if Bob is punished for not refunding in time. Alice can choose to cooperate but is not obligated to do so. This change is backwards compatible. To attempt recovery, resume a swap in the "Bitcoin punished" state. Success depends on Alice being active and still having a record of the swap. Note that Alice's cooperation is voluntary and recovery is not guaranteed @@ -370,7 +372,8 @@ It is possible to migrate critical data from the old db to the sqlite but there - Fixed an issue where Alice would not verify if Bob's Bitcoin lock transaction is semantically correct, i.e. pays the agreed upon amount to an output owned by both of them. Fixing this required a **breaking change** on the network layer and hence old versions are not compatible with this version. -[unreleased]: https://github.com/comit-network/xmr-btc-swap/compare/0.13.3...HEAD +[unreleased]: https://github.com/UnstoppableSwap/xmr-btc-swap/compare/0.13.3...HEAD +[0.13.3]: https://github.com/UnstoppableSwap/xmr-btc-swap/compare/0.13.3...0.13.3 [0.13.3]: https://github.com/comit-network/xmr-btc-swap/compare/0.13.2...0.13.3 [0.13.2]: https://github.com/comit-network/xmr-btc-swap/compare/0.13.1...0.13.2 [0.13.1]: https://github.com/comit-network/xmr-btc-swap/compare/0.13.0...0.13.1 From f5bda640a0f40ba0db886df78a666a9291128cf7 Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:31:18 +0200 Subject: [PATCH 05/11] fix: Remove duplicate entry from CHANGELOG.md --- CHANGELOG.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ef7653e..6804925c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [0.13.3] - 2024-07-16 - -## [0.13.3] - 2024-07-15 - - Introduced a cooperative Monero redeem feature for Bob to request from Alice if Bob is punished for not refunding in time. Alice can choose to cooperate but is not obligated to do so. This change is backwards compatible. To attempt recovery, resume a swap in the "Bitcoin punished" state. Success depends on Alice being active and still having a record of the swap. Note that Alice's cooperation is voluntary and recovery is not guaranteed - CLI: `--change-address` can now be omitted. In that case, any change is refunded to the internal bitcoin wallet. From 7c54fb2848d2f9f9c00ff3982b044f9bbe707343 Mon Sep 17 00:00:00 2001 From: UnstoppableSwap Botty Date: Tue, 16 Jul 2024 09:40:03 +0000 Subject: [PATCH 06/11] Prepare release 0.13.3 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6804925c..f66069f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.13.3] - 2024-07-16 + - Introduced a cooperative Monero redeem feature for Bob to request from Alice if Bob is punished for not refunding in time. Alice can choose to cooperate but is not obligated to do so. This change is backwards compatible. To attempt recovery, resume a swap in the "Bitcoin punished" state. Success depends on Alice being active and still having a record of the swap. Note that Alice's cooperation is voluntary and recovery is not guaranteed - CLI: `--change-address` can now be omitted. In that case, any change is refunded to the internal bitcoin wallet. @@ -370,6 +372,7 @@ It is possible to migrate critical data from the old db to the sqlite but there [unreleased]: https://github.com/UnstoppableSwap/xmr-btc-swap/compare/0.13.3...HEAD [0.13.3]: https://github.com/UnstoppableSwap/xmr-btc-swap/compare/0.13.3...0.13.3 +[0.13.3]: https://github.com/UnstoppableSwap/xmr-btc-swap/compare/0.13.3...0.13.3 [0.13.3]: https://github.com/comit-network/xmr-btc-swap/compare/0.13.2...0.13.3 [0.13.2]: https://github.com/comit-network/xmr-btc-swap/compare/0.13.1...0.13.2 [0.13.1]: https://github.com/comit-network/xmr-btc-swap/compare/0.13.0...0.13.1 From eef78cddb21b64b96bed11ed7ea5edadc9b62c90 Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:27:56 +0200 Subject: [PATCH 07/11] CI: Exclude preview releases from "latest" docker release tag --- .github/workflows/build-release-binaries.yml | 21 +++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index 565d2dbd..4f466ada 100644 --- a/.github/workflows/build-release-binaries.yml +++ b/.github/workflows/build-release-binaries.yml @@ -145,6 +145,15 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Set Docker tags + id: docker_tags + run: | + if [[ ${{ github.event.release.tag_name }} == "preview" ]]; then + echo "::set-output name=preview::true" + else + echo "::set-output name=preview::false" + fi + - name: Build and push Docker image uses: docker/build-push-action@v4 with: @@ -152,5 +161,15 @@ jobs: file: ./Dockerfile push: true tags: | - ${{ env.DOCKER_IMAGE_NAME }}:latest ${{ env.DOCKER_IMAGE_NAME }}:${{ github.event.release.tag_name }} + ${{ env.DOCKER_IMAGE_NAME }}:latest + if: steps.docker_tags.outputs.preview == 'false' + + - name: Build and push Docker image without latest tag (preview release) + uses: docker/build-push-action@v4 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{ env.DOCKER_IMAGE_NAME }}:${{ github.event.release.tag_name }} + if: steps.docker_tags.outputs.preview == 'true' From 8ba8e3bd5c7a05468cb425fd4952d29f4495b99a Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:32:04 +0200 Subject: [PATCH 08/11] fix: Revert 0.13.3 release --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f66069f8..5f565027 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [0.13.3] - 2024-07-16 - - Introduced a cooperative Monero redeem feature for Bob to request from Alice if Bob is punished for not refunding in time. Alice can choose to cooperate but is not obligated to do so. This change is backwards compatible. To attempt recovery, resume a swap in the "Bitcoin punished" state. Success depends on Alice being active and still having a record of the swap. Note that Alice's cooperation is voluntary and recovery is not guaranteed - CLI: `--change-address` can now be omitted. In that case, any change is refunded to the internal bitcoin wallet. From 410fcf211792dfcee9e97bb4f04fab4eaee39807 Mon Sep 17 00:00:00 2001 From: UnstoppableSwap Botty Date: Mon, 22 Jul 2024 14:40:59 +0000 Subject: [PATCH 09/11] Prepare release 0.13.3 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f565027..686c4ed5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.13.3] - 2024-07-22 + - Introduced a cooperative Monero redeem feature for Bob to request from Alice if Bob is punished for not refunding in time. Alice can choose to cooperate but is not obligated to do so. This change is backwards compatible. To attempt recovery, resume a swap in the "Bitcoin punished" state. Success depends on Alice being active and still having a record of the swap. Note that Alice's cooperation is voluntary and recovery is not guaranteed - CLI: `--change-address` can now be omitted. In that case, any change is refunded to the internal bitcoin wallet. @@ -371,6 +373,7 @@ It is possible to migrate critical data from the old db to the sqlite but there [unreleased]: https://github.com/UnstoppableSwap/xmr-btc-swap/compare/0.13.3...HEAD [0.13.3]: https://github.com/UnstoppableSwap/xmr-btc-swap/compare/0.13.3...0.13.3 [0.13.3]: https://github.com/UnstoppableSwap/xmr-btc-swap/compare/0.13.3...0.13.3 +[0.13.3]: https://github.com/UnstoppableSwap/xmr-btc-swap/compare/0.13.3...0.13.3 [0.13.3]: https://github.com/comit-network/xmr-btc-swap/compare/0.13.2...0.13.3 [0.13.2]: https://github.com/comit-network/xmr-btc-swap/compare/0.13.1...0.13.2 [0.13.1]: https://github.com/comit-network/xmr-btc-swap/compare/0.13.0...0.13.1 From 75cfc6b0d4169d72f136266af122381a05bb9efe Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Thu, 25 Jul 2024 00:13:15 +0200 Subject: [PATCH 10/11] fix(cli): allow bitcoin-change-address to be omitted when making request to rpc server (#1728) --- swap/src/api.rs | 2 +- swap/src/api/request.rs | 21 ++++++++++++++++++++- swap/src/cli/command.rs | 24 +++--------------------- swap/src/rpc/methods.rs | 29 +++++++++++++++++++---------- 4 files changed, 43 insertions(+), 33 deletions(-) diff --git a/swap/src/api.rs b/swap/src/api.rs index 36c6972f..5640c833 100644 --- a/swap/src/api.rs +++ b/swap/src/api.rs @@ -437,7 +437,7 @@ pub mod api_test { Request::new(Method::BuyXmr { seller, - bitcoin_change_address, + bitcoin_change_address: Some(bitcoin_change_address), monero_receive_address, swap_id: Uuid::new_v4(), }) diff --git a/swap/src/api/request.rs b/swap/src/api/request.rs index 50274ab1..b1e9c68c 100644 --- a/swap/src/api/request.rs +++ b/swap/src/api/request.rs @@ -31,7 +31,7 @@ pub struct Request { pub enum Method { BuyXmr { seller: Multiaddr, - bitcoin_change_address: bitcoin::Address, + bitcoin_change_address: Option, monero_receive_address: monero::Address, swap_id: Uuid, }, @@ -335,6 +335,25 @@ impl Request { let env_config = context.config.env_config; let seed = context.config.seed.clone().context("Could not get seed")?; + // When no change address was provided we default to the internal wallet + let bitcoin_change_address = match bitcoin_change_address { + Some(addr) => addr, + None => { + let internal_wallet_address = context + .bitcoin_wallet() + .expect("bitcoin wallet should exist") + .new_address() + .await?; + + tracing::info!( + internal_wallet_address=%internal_wallet_address, + "No --change-address supplied. Any change will be received to the internal wallet." + ); + + internal_wallet_address + } + }; + let seller_peer_id = seller .extract_peer_id() .context("Seller address must contain peer ID")?; diff --git a/swap/src/cli/command.rs b/swap/src/cli/command.rs index f3d61c92..4881d94e 100644 --- a/swap/src/cli/command.rs +++ b/swap/src/cli/command.rs @@ -81,29 +81,11 @@ where ) .await?; - // when no refund address was provided we default to the internal wallet - let bitcoin_change_address = match bitcoin_change_address { - Some(addr) => addr, - None => { - let internal_wallet_address = context - .bitcoin_wallet() - .expect("bitcoin wallet should exist") - .new_address() - .await?; - - tracing::info!( - internal_wallet_address=%internal_wallet_address, - "No --change-address supplied. Any change will be received to the internal wallet." - ); - - internal_wallet_address - } - }; - let monero_receive_address = monero_address::validate_is_testnet(monero_receive_address, is_testnet)?; - let bitcoin_change_address = - bitcoin_address::validate_is_testnet(bitcoin_change_address, is_testnet)?; + let bitcoin_change_address = bitcoin_change_address + .map(|address| bitcoin_address::validate_is_testnet(address, is_testnet)) + .transpose()?; let request = Request::new(Method::BuyXmr { seller, diff --git a/swap/src/rpc/methods.rs b/swap/src/rpc/methods.rs index 83100d4a..f804e085 100644 --- a/swap/src/rpc/methods.rs +++ b/swap/src/rpc/methods.rs @@ -135,16 +135,25 @@ pub fn register_modules(context: Arc) -> Result> module.register_async_method("buy_xmr", |params_raw, context| async move { let params: HashMap = params_raw.parse()?; - let bitcoin_change_address = - bitcoin::Address::from_str(params.get("bitcoin_change_address").ok_or_else(|| { - jsonrpsee_core::Error::Custom("Does not contain bitcoin_change_address".to_string()) - })?) - .map_err(|err| jsonrpsee_core::Error::Custom(err.to_string()))?; - - let bitcoin_change_address = bitcoin_address::validate( - bitcoin_change_address, - context.config.env_config.bitcoin_network, - )?; + let bitcoin_change_address = params + .get("bitcoin_change_address") + .map(|addr_str| { + bitcoin::Address::from_str(addr_str) + .map_err(|err| { + jsonrpsee_core::Error::Custom(format!( + "Could not parse bitcoin address: {}", + err + )) + }) + .and_then(|address| { + bitcoin_address::validate( + address, + context.config.env_config.bitcoin_network, + ) + .map_err(|err| jsonrpsee_core::Error::Custom(err.to_string())) + }) + }) + .transpose()?; let monero_receive_address = monero::Address::from_str(params.get("monero_receive_address").ok_or_else(|| { From 2eda2476ebd4953858f951cf2a401264319f868b Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Thu, 25 Jul 2024 15:01:12 +0200 Subject: [PATCH 11/11] Revert "Merge branch 'master' into master" (#1730) This reverts commit ce8d3afe60f520523fe6ab6b8d1b3de3d07e2027, reversing changes made to 75cfc6b0d4169d72f136266af122381a05bb9efe. --- .github/workflows/build-release-binaries.yml | 53 +------------------- CHANGELOG.md | 7 +-- Dockerfile | 18 ------- 3 files changed, 3 insertions(+), 75 deletions(-) delete mode 100644 Dockerfile diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index 4f466ada..662e3a5e 100644 --- a/.github/workflows/build-release-binaries.yml +++ b/.github/workflows/build-release-binaries.yml @@ -4,9 +4,6 @@ on: release: types: [created] -env: - DOCKER_IMAGE_NAME: unstoppableswap/asb - jobs: build_binaries: name: Build @@ -85,7 +82,7 @@ jobs: run: target/${{ matrix.target }}/release/${{ matrix.bin }} --help - id: create-archive-name - shell: python + shell: python # Use python to have a prettier name for the archive on Windows. run: | import platform os_info = platform.uname() @@ -125,51 +122,3 @@ jobs: asset_path: ./${{ steps.create-archive-name.outputs.archive }} asset_name: ${{ steps.create-archive-name.outputs.archive }} asset_content_type: application/gzip - - build_and_push_docker: - name: Build and Push Docker Image - runs-on: ubuntu-latest - needs: build_binaries - steps: - - name: Checkout code - uses: actions/checkout@v4.1.7 - with: - ref: ${{ github.event.release.target_commitish }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Set Docker tags - id: docker_tags - run: | - if [[ ${{ github.event.release.tag_name }} == "preview" ]]; then - echo "::set-output name=preview::true" - else - echo "::set-output name=preview::false" - fi - - - name: Build and push Docker image - uses: docker/build-push-action@v4 - with: - context: . - file: ./Dockerfile - push: true - tags: | - ${{ env.DOCKER_IMAGE_NAME }}:${{ github.event.release.tag_name }} - ${{ env.DOCKER_IMAGE_NAME }}:latest - if: steps.docker_tags.outputs.preview == 'false' - - - name: Build and push Docker image without latest tag (preview release) - uses: docker/build-push-action@v4 - with: - context: . - file: ./Dockerfile - push: true - tags: ${{ env.DOCKER_IMAGE_NAME }}:${{ github.event.release.tag_name }} - if: steps.docker_tags.outputs.preview == 'true' diff --git a/CHANGELOG.md b/CHANGELOG.md index eaa3ad2a..5152d646 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - ASB: The `history` command can now be used while the asb is running. -## [0.13.3] - 2024-07-22 +## [0.13.3] - 2024-07-15 - Introduced a cooperative Monero redeem feature for Bob to request from Alice if Bob is punished for not refunding in time. Alice can choose to cooperate but is not obligated to do so. This change is backwards compatible. To attempt recovery, resume a swap in the "Bitcoin punished" state. Success depends on Alice being active and still having a record of the swap. Note that Alice's cooperation is voluntary and recovery is not guaranteed - CLI: `--change-address` can now be omitted. In that case, any change is refunded to the internal bitcoin wallet. @@ -372,10 +372,7 @@ It is possible to migrate critical data from the old db to the sqlite but there - Fixed an issue where Alice would not verify if Bob's Bitcoin lock transaction is semantically correct, i.e. pays the agreed upon amount to an output owned by both of them. Fixing this required a **breaking change** on the network layer and hence old versions are not compatible with this version. -[unreleased]: https://github.com/UnstoppableSwap/xmr-btc-swap/compare/0.13.3...HEAD -[0.13.3]: https://github.com/UnstoppableSwap/xmr-btc-swap/compare/0.13.3...0.13.3 -[0.13.3]: https://github.com/UnstoppableSwap/xmr-btc-swap/compare/0.13.3...0.13.3 -[0.13.3]: https://github.com/UnstoppableSwap/xmr-btc-swap/compare/0.13.3...0.13.3 +[unreleased]: https://github.com/comit-network/xmr-btc-swap/compare/0.13.3...HEAD [0.13.3]: https://github.com/comit-network/xmr-btc-swap/compare/0.13.2...0.13.3 [0.13.2]: https://github.com/comit-network/xmr-btc-swap/compare/0.13.1...0.13.2 [0.13.1]: https://github.com/comit-network/xmr-btc-swap/compare/0.13.0...0.13.1 diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 2dbf5397..00000000 --- a/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM rust:1.59-slim AS builder - -WORKDIR /build - -RUN apt-get update -RUN apt-get install -y git clang cmake libsnappy-dev - -COPY . . - -RUN cargo build --release --bin=asb - -FROM debian:bullseye-slim - -WORKDIR /data - -COPY --from=builder /build/target/release/asb /bin/asb - -ENTRYPOINT ["asb"]