refactor: use image field in docker-compose to leverage docker buildx for caching purposes

This commit is contained in:
adrian
2025-09-12 10:18:26 +02:00
committed by Adrian Benavides
parent 92336df9bb
commit 298bf13e87
2 changed files with 6 additions and 6 deletions

View File

@@ -5,6 +5,10 @@ Rust-based integration testing framework for Tycho protocol implementations.
## How to Run ## How to Run
```bash ```bash
# Build the images
docker buildx build -f postgres.Dockerfile -t protocol-testing-db:latest --load .
docker buildx build -f run.Dockerfile -t protocol-testing-test-runner:latest --load .
# Export necessary env vars # Export necessary env vars
export RPC_URL=.. export RPC_URL=..
export SUBSTREAMS_API_TOKEN=.. export SUBSTREAMS_API_TOKEN=..

View File

@@ -1,8 +1,6 @@
services: services:
db: db:
build: image: protocol-testing-db:latest
context: .
dockerfile: postgres.Dockerfile
restart: "always" restart: "always"
healthcheck: healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ] test: [ "CMD-SHELL", "pg_isready -U postgres" ]
@@ -21,9 +19,7 @@ services:
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql/data
test-runner: test-runner:
build: image: protocol-testing-test-runner:latest
context: .
dockerfile: run.Dockerfile
depends_on: depends_on:
db: db:
condition: service_healthy condition: service_healthy