Skip to content

Commit

Permalink
Fix dockerfile build for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenzing committed Jan 17, 2024
1 parent d6a013b commit 304667a
Show file tree
Hide file tree
Showing 14 changed files with 112 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
always() &&
(needs.test.result == 'success' || needs.test.result == 'cancelled') &&
(needs.lint.result == 'success' || needs.lint.result == 'cancelled')
timeout-minutes: 60
timeout-minutes: 90
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/eth-bytecode-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
always() &&
(needs.test.result == 'success' || needs.test.result == 'cancelled') &&
(needs.lint.result == 'success' || needs.lint.result == 'cancelled')
timeout-minutes: 30
timeout-minutes: 90
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/multichain-search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
always() &&
(needs.test.result == 'success' || needs.test.result == 'cancelled') &&
(needs.lint.result == 'success' || needs.lint.result == 'cancelled')
timeout-minutes: 30
timeout-minutes: 90
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sig-provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
always() &&
(needs.test.result == 'success' || needs.test.result == 'cancelled') &&
(needs.lint.result == 'success' || needs.lint.result == 'cancelled')
timeout-minutes: 30
timeout-minutes: 90
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smart-contract-verifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
always() &&
(needs.test.result == 'success' || needs.test.result == 'cancelled') &&
(needs.lint.result == 'success' || needs.lint.result == 'cancelled')
timeout-minutes: 30
timeout-minutes: 90
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
always() &&
(needs.test.result == 'success' || needs.test.result == 'cancelled') &&
(needs.lint.result == 'success' || needs.lint.result == 'cancelled')
timeout-minutes: 30
timeout-minutes: 90
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/user-ops-indexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
always() &&
(needs.test.result == 'success' || needs.test.result == 'cancelled') &&
(needs.lint.result == 'success' || needs.lint.result == 'cancelled')
timeout-minutes: 30
timeout-minutes: 90
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/visualizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
always() &&
(needs.test.result == 'success' || needs.test.result == 'cancelled') &&
(needs.lint.result == 'success' || needs.lint.result == 'cancelled')
timeout-minutes: 30
timeout-minutes: 90
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
30 changes: 18 additions & 12 deletions eth-bytecode-db/eth-bytecode-db-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.72-buster as chef
WORKDIR /app

RUN apt-get update && apt-get install -y curl wget unzip
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip -O ./protoc.zip \
&& unzip protoc.zip \
&& mv ./include/* /usr/include/ \
&& mv ./bin/protoc /usr/bin/protoc

RUN wget https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v2.15.0/protoc-gen-openapiv2-v2.15.0-linux-x86_64 -O ./protoc-gen-openapiv2 \
&& chmod +x protoc-gen-openapiv2 \
&& mv ./protoc-gen-openapiv2 /usr/bin/protoc-gen-openapiv2
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.74-buster as chef

WORKDIR /app
ARG TARGETARCH
RUN case ${TARGETARCH} in \
"arm64") TARGETARCH=aarch_64 ;; \
"amd64") TARGETARCH=x86_64 ;; \
esac \
&& wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-$TARGETARCH.zip -O ./protoc.zip \
&& unzip protoc.zip \
&& mv ./include/* /usr/include/ \
&& mv ./bin/protoc /usr/bin/protoc

RUN case ${TARGETARCH} in \
"amd64") TARGETARCH=x86_64 ;; \
esac \
&& wget https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v2.15.0/protoc-gen-openapiv2-v2.15.0-linux-$TARGETARCH -O ./protoc-gen-openapiv2 \
&& chmod +x protoc-gen-openapiv2 \
&& mv ./protoc-gen-openapiv2 /usr/bin/protoc-gen-openapiv2
FROM chef AS plan
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
Expand Down
29 changes: 18 additions & 11 deletions smart-contract-verifier/smart-contract-verifier-http/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.72-buster as chef
WORKDIR /app

RUN apt-get update && apt-get install -y curl wget unzip
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip -O ./protoc.zip \
&& unzip protoc.zip \
&& mv ./include/* /usr/include/ \
&& mv ./bin/protoc /usr/bin/protoc
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.74-buster as chef

RUN wget https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v2.15.0/protoc-gen-openapiv2-v2.15.0-linux-x86_64 -O ./protoc-gen-openapiv2 \
&& chmod +x protoc-gen-openapiv2 \
&& mv ./protoc-gen-openapiv2 /usr/bin/protoc-gen-openapiv2
WORKDIR /app
ARG TARGETARCH
RUN case ${TARGETARCH} in \
"arm64") TARGETARCH=aarch_64 ;; \
"amd64") TARGETARCH=x86_64 ;; \
esac \
&& wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-$TARGETARCH.zip -O ./protoc.zip \
&& unzip protoc.zip \
&& mv ./include/* /usr/include/ \
&& mv ./bin/protoc /usr/bin/protoc

RUN case ${TARGETARCH} in \
"amd64") TARGETARCH=x86_64 ;; \
esac \
&& wget https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v2.15.0/protoc-gen-openapiv2-v2.15.0-linux-$TARGETARCH -O ./protoc-gen-openapiv2 \
&& chmod +x protoc-gen-openapiv2 \
&& mv ./protoc-gen-openapiv2 /usr/bin/protoc-gen-openapiv2

FROM chef AS plan
COPY . .
Expand Down
29 changes: 18 additions & 11 deletions smart-contract-verifier/smart-contract-verifier-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.72-buster as chef
WORKDIR /app

RUN apt-get update && apt-get install -y curl wget unzip
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip -O ./protoc.zip \
&& unzip protoc.zip \
&& mv ./include/* /usr/include/ \
&& mv ./bin/protoc /usr/bin/protoc
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.74-buster as chef

RUN wget https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v2.15.0/protoc-gen-openapiv2-v2.15.0-linux-x86_64 -O ./protoc-gen-openapiv2 \
&& chmod +x protoc-gen-openapiv2 \
&& mv ./protoc-gen-openapiv2 /usr/bin/protoc-gen-openapiv2
WORKDIR /app
ARG TARGETARCH
RUN case ${TARGETARCH} in \
"arm64") TARGETARCH=aarch_64 ;; \
"amd64") TARGETARCH=x86_64 ;; \
esac \
&& wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-$TARGETARCH.zip -O ./protoc.zip \
&& unzip protoc.zip \
&& mv ./include/* /usr/include/ \
&& mv ./bin/protoc /usr/bin/protoc

RUN case ${TARGETARCH} in \
"amd64") TARGETARCH=x86_64 ;; \
esac \
&& wget https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v2.15.0/protoc-gen-openapiv2-v2.15.0-linux-$TARGETARCH -O ./protoc-gen-openapiv2 \
&& chmod +x protoc-gen-openapiv2 \
&& mv ./protoc-gen-openapiv2 /usr/bin/protoc-gen-openapiv2

FROM chef AS plan
COPY . .
Expand Down
29 changes: 18 additions & 11 deletions stats/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.72-buster as chef
WORKDIR /app

RUN apt-get update && apt-get install -y curl wget unzip
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip -O ./protoc.zip \
&& unzip protoc.zip \
&& mv ./include/* /usr/include/ \
&& mv ./bin/protoc /usr/bin/protoc
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.74-buster as chef

RUN wget https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v2.15.0/protoc-gen-openapiv2-v2.15.0-linux-x86_64 -O ./protoc-gen-openapiv2 \
&& chmod +x protoc-gen-openapiv2 \
&& mv ./protoc-gen-openapiv2 /usr/bin/protoc-gen-openapiv2
WORKDIR /app
ARG TARGETARCH
RUN case ${TARGETARCH} in \
"arm64") TARGETARCH=aarch_64 ;; \
"amd64") TARGETARCH=x86_64 ;; \
esac \
&& wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-$TARGETARCH.zip -O ./protoc.zip \
&& unzip protoc.zip \
&& mv ./include/* /usr/include/ \
&& mv ./bin/protoc /usr/bin/protoc

RUN case ${TARGETARCH} in \
"amd64") TARGETARCH=x86_64 ;; \
esac \
&& wget https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v2.15.0/protoc-gen-openapiv2-v2.15.0-linux-$TARGETARCH -O ./protoc-gen-openapiv2 \
&& chmod +x protoc-gen-openapiv2 \
&& mv ./protoc-gen-openapiv2 /usr/bin/protoc-gen-openapiv2

FROM chef AS plan
COPY . .
Expand Down
29 changes: 18 additions & 11 deletions user-ops-indexer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.72-buster as chef
WORKDIR /app

RUN apt-get update && apt-get install -y curl wget unzip
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip -O ./protoc.zip \
&& unzip protoc.zip \
&& mv ./include/* /usr/include/ \
&& mv ./bin/protoc /usr/bin/protoc
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.74-buster as chef

RUN wget https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v2.15.0/protoc-gen-openapiv2-v2.15.0-linux-x86_64 -O ./protoc-gen-openapiv2 \
&& chmod +x protoc-gen-openapiv2 \
&& mv ./protoc-gen-openapiv2 /usr/bin/protoc-gen-openapiv2
WORKDIR /app
ARG TARGETARCH
RUN case ${TARGETARCH} in \
"arm64") TARGETARCH=aarch_64 ;; \
"amd64") TARGETARCH=x86_64 ;; \
esac \
&& wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-$TARGETARCH.zip -O ./protoc.zip \
&& unzip protoc.zip \
&& mv ./include/* /usr/include/ \
&& mv ./bin/protoc /usr/bin/protoc

RUN case ${TARGETARCH} in \
"amd64") TARGETARCH=x86_64 ;; \
esac \
&& wget https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v2.15.0/protoc-gen-openapiv2-v2.15.0-linux-$TARGETARCH -O ./protoc-gen-openapiv2 \
&& chmod +x protoc-gen-openapiv2 \
&& mv ./protoc-gen-openapiv2 /usr/bin/protoc-gen-openapiv2

FROM chef AS plan
COPY . .
Expand Down
23 changes: 14 additions & 9 deletions visualizer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.72-buster as chef
RUN apt-get update && apt-get install -y curl wget unzip
WORKDIR /app
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.74-buster as chef

# Install protoc
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip -O ./protoc.zip \
WORKDIR /app
ARG TARGETARCH
RUN case ${TARGETARCH} in \
"arm64") TARGETARCH=aarch_64 ;; \
"amd64") TARGETARCH=x86_64 ;; \
esac \
&& wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-$TARGETARCH.zip -O ./protoc.zip \
&& unzip protoc.zip \
&& mv ./include/* /usr/include/ \
&& mv ./bin/protoc /usr/bin/protoc

# Install protoc-gen-openapiv2
RUN wget https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v2.15.0/protoc-gen-openapiv2-v2.15.0-linux-x86_64 -O ./protoc-gen-openapiv2 \
&& chmod +x protoc-gen-openapiv2 \
&& mv ./protoc-gen-openapiv2 /usr/bin/protoc-gen-openapiv2
RUN case ${TARGETARCH} in \
"amd64") TARGETARCH=x86_64 ;; \
esac \
&& wget https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v2.15.0/protoc-gen-openapiv2-v2.15.0-linux-$TARGETARCH -O ./protoc-gen-openapiv2 \
&& chmod +x protoc-gen-openapiv2 \
&& mv ./protoc-gen-openapiv2 /usr/bin/protoc-gen-openapiv2


FROM chef AS plan
Expand Down

0 comments on commit 304667a

Please sign in to comment.