Skip to content

Commit

Permalink
Merge pull request #205 from m-Peter/fix-docker-builds
Browse files Browse the repository at this point in the history
Build with `CGO_ENABLED=1`
  • Loading branch information
m-Peter authored Apr 18, 2024
2 parents e85fa15 + 0ce4cfa commit 8e0e494
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COPY go.* ./
COPY . ./
RUN go mod download
RUN go mod verify
RUN CGO_ENABLED=0 go build -o evm-gateway ./cmd/main/main.go
RUN CGO_ENABLED=1 go build -o evm-gateway ./cmd/main/main.go
RUN chmod a+x evm-gateway
RUN chmod a+x ./scripts/run.sh

Expand Down
4 changes: 2 additions & 2 deletions dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:latest

# Install curl, Git, and other required dependencies
RUN apt-get update && apt-get install -y curl git
RUN apt-get update && apt-get install -y curl git gcc

# Download and verify the Go archive
RUN curl -LO https://go.dev/dl/go1.22.2.linux-amd64.tar.gz && \
Expand All @@ -23,7 +23,7 @@ RUN git clone https://github.com/onflow/flow-evm-gateway.git /app/flow-evm-gatew

RUN cd /app/flow-evm-gateway && go mod download
RUN cd /app/flow-evm-gateway && go mod verify
RUN cd /app/flow-evm-gateway && CGO_ENABLED=0 go build -o /app/flow-evm-gateway/evm-gateway /app/flow-evm-gateway/cmd/main/main.go
RUN cd /app/flow-evm-gateway && CGO_ENABLED=1 go build -o /app/flow-evm-gateway/evm-gateway /app/flow-evm-gateway/cmd/main/main.go
RUN chmod a+x /app/flow-evm-gateway/evm-gateway

# Copy the flow.json file to the directory where the gateway expects to find it
Expand Down

0 comments on commit 8e0e494

Please sign in to comment.