Skip to content

Commit

Permalink
do the packr in releaser before hook
Browse files Browse the repository at this point in the history
  • Loading branch information
christophercampbell committed Feb 27, 2024
1 parent 1633264 commit 3f42793
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .goreleaser-cdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ release:
draft: true
prerelease: auto

before:
hooks:
- go mod download
- go install github.com/gobuffalo/packr/v2/[email protected]
- ( cd db && packr2 )

builds:
- main: ./cmd/
binary: zkevm-node
Expand Down
22 changes: 8 additions & 14 deletions Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
# CONTAINER FOR BUILDING BINARY
FROM golang:1.21 AS build

# INSTALL DEPENDENCIES
RUN go install github.com/gobuffalo/packr/v2/[email protected]
COPY go.mod go.sum /src/
RUN cd /src && go mod download
FROM alpine:3.18

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

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

RUN chown -R /app zkevm-user:zkevm-group

USER zkevm-user

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

0 comments on commit 3f42793

Please sign in to comment.