forked from PundiAI/pundix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a2688f2
commit 0eb790f
Showing
1 changed file
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |