-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathDockerfile
62 lines (46 loc) · 1.13 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#
# Arkeo
#
ARG GO_VERSION="1.20"
#
# Build
#
FROM golang:${GO_VERSION} as builder
ARG GIT_VERSION
ARG GIT_COMMIT
ENV GOBIN=/go/bin
ENV GOPATH=/go
ENV CGO_ENABLED=0
ENV GOOS=linux
RUN go install github.com/jackc/tern/v2@latest
# Download go dependencies
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
# 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