Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.
Open
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
21 changes: 14 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,26 @@
FROM golang:1.21 AS build

# INSTALL DEPENDENCIES
WORKDIR /src
RUN go install github.com/gobuffalo/packr/v2/packr2@v2.8.3
COPY go.mod go.sum /src/
RUN cd /src && go mod download
COPY go.mod go.sum ./
RUN go mod download

# BUILD BINARY
COPY . /src
RUN cd /src/db && packr2
RUN cd /src && make build
COPY . .
RUN packr2 && make build

# CONTAINER FOR RUNNING BINARY
FROM alpine:3.18

# INSTALL REQUIRED PACKAGES
RUN apk add --no-cache postgresql15-client

# COPY BUILT BINARY AND CONFIG FILE
COPY --from=build /src/dist/zkevm-node /app/zkevm-node
COPY --from=build /src/config/environments/testnet/node.config.toml /app/example.config.toml
RUN apk update && apk add postgresql15-client

# SET EXECUTION ENVIRONMENT
WORKDIR /app
EXPOSE 8123
CMD ["/bin/sh", "-c", "/app/zkevm-node run"]
CMD ["./zkevm-node", "run"]