Skip to content

Commit

Permalink
fix an issue with the platform setup for the deployer (due to solc no…
Browse files Browse the repository at this point in the history
…t having arm target)
  • Loading branch information
rodrigo-o committed Nov 12, 2024
1 parent 803c692 commit 502ad73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crates/l2/contracts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@ RUN cargo chef cook --release --recipe-path recipe.json --manifest-path crates/l
COPY . .
RUN cargo build --release --manifest-path crates/l2/contracts/Cargo.toml

FROM ubuntu:24.04
FROM --platform=${BUILDPLATFORM} ubuntu:24.04
WORKDIR /usr/local/bin

RUN apt-get update && apt-get -y install git gnupg
RUN echo 'deb https://ppa.launchpadcontent.net/ethereum/ethereum/ubuntu noble main' > /etc/apt/sources.list.d/ethereum-ethereum-noble.list && \
echo 'deb-src https://ppa.launchpadcontent.net/ethereum/ethereum/ubuntu noble main' >> /etc/apt/sources.list.d/ethereum-ethereum-noble.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E66CB8FE57F8218E96B13446B50ABD2EE384B7D4
RUN apt-get update && apt-get -y install git gnupg software-properties-common
RUN add-apt-repository ppa:ethereum/ethereum
RUN apt-get update && apt-get -y install solc
RUN solc --version

COPY --from=builder ethereum_rust/target/release/ethereum_rust_l2_l1_deployer .

Expand Down
3 changes: 3 additions & 0 deletions crates/l2/docker-compose-l2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ include:

services:
contract_deployer:
platform: linux/amd64
container_name: contract_deployer
image: ethereum_rust_l2_contract_deployer
build:
context: ../../
args:
- BUILDPLATFORM=linux/amd64
dockerfile: ./crates/l2/contracts/Dockerfile
volumes:
- ./contracts:/contracts
Expand Down

0 comments on commit 502ad73

Please sign in to comment.