Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
mertwole committed Sep 23, 2024
1 parent 95660c2 commit ef5a6d9
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Rust build directory
target

# Resource files
audits
images
LICENSE
*.md

# Git directory
.git

# IDE-generated files
.vscode
.idea

# Relayer config and intermediate data
data
proof_storage
onchain_proof_storage_data
.env
GenesisConfig.toml

# Ethereum-related
ethereum/cache
ethereum/out
ethereum/broadcast
46 changes: 46 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM ubuntu:22.04 as builder
SHELL ["/bin/bash", "-c"]

# Install deps
RUN apt-get update
RUN apt-get install -y \
curl \
build-essential \
pkg-config \
libssl-dev \
cmake \
git \
wget \
gcc \
protobuf-compiler \
clang

# Install rust
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Install wasm-opt
RUN cargo install wasm-opt

# Install go
RUN wget -P /tmp "https://go.dev/dl/go1.20.1.linux-amd64.tar.gz"
RUN tar -C /usr/local -xzf "/tmp/go1.20.1.linux-amd64.tar.gz"
RUN rm "/tmp/go1.20.1.linux-amd64.tar.gz"
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"

# Install foundry
RUN curl -L https://foundry.paradigm.xyz | bash
RUN /root/.foundry/bin/foundryup
ENV PATH="/root/.foundry/bin:${PATH}"

COPY . .

# Build relayer
RUN cargo build -p relayer --release

# Compose final image
FROM ubuntu:22.04
COPY --from=builder /target/release/relayer /usr/local/bin/relayer
CMD ["relayer"]

0 comments on commit ef5a6d9

Please sign in to comment.