Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# Login against a Docker registry
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
Expand All @@ -42,6 +48,12 @@ jobs:
with:
images: ${{ matrix.image }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
type=sha,format=long
# set latest tag for default branch
Expand All @@ -57,3 +69,6 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
provenance: mode=max
sbom: true
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM --platform=linux/amd64 rust:1.88.0-bookworm as builder
FROM rust:1.88.0-bookworm AS builder
ARG TARGETPLATFORM
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true

RUN apt-get update && apt-get install -y \
Expand All @@ -12,9 +13,14 @@ WORKDIR /app
COPY . .

# Build for standard Linux (glibc) instead of musl
RUN RUSTFLAGS='-C target-cpu=x86-64-v2' cargo build --release --features jemalloc --workspace --exclude rust-sdk-playground --exclude e2e-tests
# Use architecture-specific target triples and CPU optimization flags
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
RUSTFLAGS='-C target-cpu=x86-64-v2' cargo build --release --features jemalloc --workspace --exclude rust-sdk-playground --exclude e2e-tests; \
else \
cargo build --release --workspace --exclude rust-sdk-playground --exclude e2e-tests; \
fi

FROM --platform=linux/amd64 debian:bookworm-slim
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
libssl3 \
ca-certificates \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ docker run -it -v $PWD:/app/project ghcr.io/joshstevens19/rrelayer --help
### Example: Creating a new project

```bash
docker run -it -v $PWD:/app/project ghcr.io/joshstevens19/rrelayer new
docker run -it -v $PWD:/app/project ghcr.io/joshstevens19/rrelayer new -p /app/project
```

### Running with existing project

```bash
export PROJECT_PATH=/path/to/your/project

docker run -it -v $PROJECT_PATH:/app/project ghcr.io/joshstevens19/rrelayer start
docker run -it -v $PROJECT_PATH:/app/project ghcr.io/joshstevens19/rrelayer start -p /app/project
```

:::info
Expand Down