Skip to content

Commit

Permalink
fix: build with Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
devon-chain committed Oct 21, 2022
1 parent a2688f2 commit 0eb790f
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
FROM alpine:latest
# compile fx-core
FROM golang:1.18.2-alpine3.16 as builder

RUN apk add --no-cache git build-base linux-headers

WORKDIR /app

# download and cache go mod
COPY ./go.* ./
RUN go env -w GO111MODULE=on && go mod download

COPY . .

RUN make build

# build fx-core
FROM alpine:3.16

WORKDIR root

COPY ./build/bin/pundixd /usr/bin/pundixd
COPY --from=builder /app/build/bin/pundixd /usr/bin/pundixd

EXPOSE 26656/tcp 26657/tcp 26660/tcp 9090/tcp 1317/tcp
EXPOSE 26656/tcp 26657/tcp 26660/tcp 9090/tcp 1317/tcp 8545/tcp 8546/tcp

VOLUME ["/root"]

ENTRYPOINT ["pundixd"]
ENTRYPOINT ["pundixd"]

0 comments on commit 0eb790f

Please sign in to comment.