From 49530a127942bd1e1e0b5c77b5f4d7092481863d Mon Sep 17 00:00:00 2001 From: Vid Kersic Date: Fri, 1 Sep 2023 14:33:36 +0200 Subject: [PATCH] fix: fix docker --- Dockerfile | 4 ++++ README.md | 14 +++++++++++--- docker-compose.yml | 5 ++++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 41d57e71..23750a8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,10 @@ RUN make build # run FROM frolvlad/alpine-glibc +RUN mkdir -p /data/silius + +RUN apk add openssl1.1-compat + COPY --from=builder /silius/target/release/silius /usr/local/bin/silius EXPOSE 3000 diff --git a/README.md b/README.md index 2d1c50e5..b152773f 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,11 @@ For more information: https://hackmd.io/@Vid201/aa-bundler-rust This project is still under active development. -## Prerequisites +## Getting started + +### Native + +Prerequisites: Rust version: 1.71.1 @@ -25,8 +29,6 @@ Rust version: 1.71.1 3. [`solc`](https://docs.soliditylang.org/en/v0.8.17/installing-solidity.html) >=0.8.12. 4. [`cargo-sort`](https://crates.io/crates/cargo-sort) and [`cargo-udeps`](https://crates.io/crates/cargo-udeps). -## How to run? - Set up third-party dependencies (ERC-4337 smart contracts and bundler tests): ```bash @@ -58,6 +60,12 @@ Run only JSON-RPC API: cargo run --release --bin silius-rpc --http --ws ``` +### Docker + +```bash +docker run --net=host -v ./bundler-spec-tests/keys:/data/silius -v ./db:/data/silius/db ghcr.io/vid201/silius:latest --rpc-listen-address 0.0.0.0:3000 --eth-client-address http://127.0.0.1:8545 --datadir data/silius --mnemonic-file data/silius/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --beneficiary 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --entry-points 0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789 --http --ws --rpc-api eth,debug,web3 +``` + ## Supported networks Bundler was tested on the following networks: diff --git a/docker-compose.yml b/docker-compose.yml index 8442fd17..62357b52 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,12 +4,15 @@ services: image: ghcr.io/vid201/silius:latest network_mode: host volumes: - - ./bundler-spec-tests/keys:/data/silius + - ./bundler-spec-tests/keys/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266:/data/silius/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 + - ./db:/data/silius/db command: - --rpc-listen-address - 0.0.0.0:3000 - --eth-client-address - http://127.0.0.1:8545 + - --datadir + - data/silius - --mnemonic-file - data/silius/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 - --beneficiary