-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Dockerfile): use debug Dockerfile
- Loading branch information
Showing
4 changed files
with
33 additions
and
27 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,35 +1,18 @@ | ||
# > docker build -t cosmos-cash . | ||
# | ||
# Server: | ||
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.poaapp:/root/.poaapp poaapp init test-chain | ||
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.poaapp:/root/.poaapp poaapp start | ||
# | ||
# Client: (Note the poaapp binary always looks at ~/.poaapp we can bind to different local storage) | ||
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.poaappcli:/root/.poaapp poaapp keys add foo | ||
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.poaappcli:/root/.poaapp poaapp keys list | ||
FROM golang:alpine AS build-env | ||
FROM golang:alpine | ||
|
||
RUN apk update | ||
RUN apk add --no-cache curl make git libc-dev bash gcc linux-headers eudev-dev python3 | ||
RUN apk add --no-cache ca-certificates curl make git libc-dev bash gcc linux-headers eudev-dev python3 | ||
|
||
WORKDIR /go/src/github.com/allinbits/cosmos-cash-poa | ||
WORKDIR /root | ||
|
||
COPY . . | ||
|
||
RUN make install | ||
|
||
## Final image | ||
#FROM gcr.io/distroless/base:latest | ||
FROM alpine:edge | ||
|
||
## Install ca-certificates | ||
RUN apk add --update ca-certificates | ||
WORKDIR /root | ||
RUN go get github.com/go-delve/delve/cmd/dlv | ||
RUN make install-debug | ||
|
||
COPY --from=build-env /go/bin/poad /usr/bin/poad | ||
COPY --from=build-env /go/bin/poacli /usr/bin/poacli | ||
RUN cp ./poad /usr/bin | ||
RUN cp ./poacli /usr/bin | ||
|
||
EXPOSE 26656 26657 1317 9090 | ||
|
||
CMD ["poad"] | ||
EXPOSE 26656 26657 1317 9090 40000 | ||
|
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM golang:alpine AS build-env | ||
|
||
RUN apk update | ||
RUN apk add --no-cache curl make git libc-dev bash gcc linux-headers eudev-dev python3 | ||
|
||
WORKDIR /go/src/github.com/allinbits/cosmos-cash-poa | ||
|
||
COPY . . | ||
|
||
RUN make install | ||
|
||
## Final image | ||
#FROM gcr.io/distroless/base:latest | ||
FROM alpine:edge | ||
|
||
RUN apk add --update ca-certificates | ||
WORKDIR /root | ||
|
||
COPY --from=build-env /go/bin/poad /usr/bin/poad | ||
COPY --from=build-env /go/bin/poacli /usr/bin/poacli | ||
|
||
EXPOSE 26656 26657 1317 9090 | ||
|
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
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