-
Notifications
You must be signed in to change notification settings - Fork 20
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
89e3c5f
commit 7e1b423
Showing
6 changed files
with
145 additions
and
59 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,15 @@ | ||
# | ||
# Arkeo | ||
# | ||
FROM scratch | ||
|
||
ARG GO_VERSION="1.21" | ||
COPY ./arkeod /usr/bin/arkeod | ||
|
||
# | ||
# Build | ||
# | ||
FROM golang:${GO_VERSION} as builder | ||
WORKDIR /root/.arkeo | ||
|
||
ARG GIT_VERSION | ||
ARG GIT_COMMIT | ||
EXPOSE 1317 | ||
|
||
ENV GOBIN=/go/bin | ||
ENV GOPATH=/go | ||
ENV CGO_ENABLED=0 | ||
ENV GOOS=linux | ||
EXPOSE 26656 | ||
|
||
RUN go install github.com/jackc/tern/v2@latest | ||
EXPOSE 26657 | ||
|
||
# Download go dependencies | ||
WORKDIR /app | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
ENTRYPOINT [ "/usr/bin/arkeod" ] | ||
|
||
# Copy the entire codebase and build the application | ||
COPY . . | ||
ARG TAG=testnet | ||
RUN make install | ||
|
||
# | ||
# Main | ||
# | ||
FROM ubuntu:lunar | ||
|
||
# hadolint ignore=DL3008,DL4006 | ||
RUN apt-get update -y && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y --no-install-recommends \ | ||
jq curl htop vim ca-certificates && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
update-ca-certificates | ||
|
||
|
||
# Copy the compiled binaries over. | ||
COPY --from=builder /go/bin/sentinel /go/bin/arkeod /go/bin/indexer /go/bin/api /go/bin/tern /usr/bin/ | ||
COPY scripts /scripts | ||
|
||
ARG TAG=testnet | ||
ENV NET=$TAG | ||
|
||
|
||
ENTRYPOINT ["scripts/genesis.sh"] | ||
|
||
# default to fullnode | ||
CMD ["arkeod", "start"] | ||
|
||
# Health check to ensure the container is running properly | ||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s \ | ||
CMD curl -f http://localhost:26657/status || exit 1 | ||
CMD [ "help" ] |
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,17 @@ | ||
FROM alpine:3.18 | ||
|
||
COPY ./arkeod /usr/bin/arkeod | ||
|
||
WORKDIR /root/.arkeo | ||
|
||
RUN apk add --no-cache bash jq | ||
|
||
EXPOSE 1317 | ||
|
||
EXPOSE 26656 | ||
|
||
EXPOSE 26657 | ||
|
||
ENTRYPOINT [ "/usr/bin/arkeod" ] | ||
|
||
CMD [ "help" ] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
version: "3" | ||
|
||
services: | ||
node: | ||
image: ghcr.io/arkeonetwork/arkeod-dev:${TAG} | ||
entrypoint: | ||
- sh | ||
- /opt/genesis.sh | ||
ports: | ||
- 9090:9090 | ||
- 26657:26657 | ||
- 26656:26656 | ||
volumes: | ||
- ./scripts:/opt:z | ||
working_dir: /opt |