Skip to content

Commit

Permalink
include packr command with docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
christophercampbell committed Feb 27, 2024
1 parent d9f42c6 commit 1633264
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.21

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
21 changes: 14 additions & 7 deletions Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
FROM alpine:3.18
# CONTAINER FOR BUILDING BINARY
FROM golang:1.21 AS build

RUN apk update && apk add postgresql15-client
# INSTALL DEPENDENCIES
RUN go install github.com/gobuffalo/packr/v2/packr2@v2.8.3
COPY go.mod go.sum /src/
RUN cd /src && go mod download

EXPOSE 8123

COPY dist/zkevm-node /app/zkevm-node
# BUILD BINARY
COPY . /src
RUN cd /src/db && packr2
RUN cd /src && make build

FROM alpine:3.18
COPY --from=build /src/dist/zkevm-node /app/zkevm-node
RUN apk update && apk add postgresql15-client
EXPOSE 8123
RUN addgroup -S zkevm-group \
&& adduser -S zkevm-user -G zkevm-group

USER zkevm-user

CMD ["/bin/sh", "-c", "/app/zkevm-node run"]

0 comments on commit 1633264

Please sign in to comment.