forked from flare-foundation/go-flare
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dless
More file actions
62 lines (46 loc) · 1.5 KB
/
Dockerfile.dless
File metadata and controls
62 lines (46 loc) · 1.5 KB
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
FROM golang:1.22 AS build
RUN apt-get update -y && \
apt-get install -y rsync
WORKDIR /app/
COPY ./.git /app/.git
COPY ./avalanchego /app/avalanchego
COPY ./config /app/config
COPY ./coreth /app/coreth
WORKDIR /app/avalanchego/
RUN /app/avalanchego/scripts/build.sh
RUN mkdir -p /app/conf/coston /app/conf/C /app/logs /app/db
WORKDIR /entrypoint
COPY entrypoint/main.go .
RUN go build -ldflags="-s -w" -o /out/entrypoint main.go
FROM gcr.io/distroless/base:nonroot AS final
USER nonroot
WORKDIR /app
ENV HTTP_HOST=0.0.0.0 \
HTTP_PORT=9650 \
STAKING_PORT=9651 \
PUBLIC_IP= \
DB_DIR=/app/db \
DB_TYPE=leveldb \
BOOTSTRAP_IPS= \
BOOTSTRAP_IDS= \
CHAIN_CONFIG_DIR=/app/conf \
LOG_DIR=/app/logs \
LOG_LEVEL=info \
NETWORK_ID=costwo \
AUTOCONFIGURE_PUBLIC_IP=1 \
AUTOCONFIGURE_BOOTSTRAP=1 \
AUTOCONFIGURE_BOOTSTRAP_ENDPOINT=https://coston2-bootstrap.flare.network/ext/info \
EXTRA_ARGUMENTS="" \
BOOTSTRAP_BEACON_CONNECTION_TIMEOUT="1m" \
HTTP_ALLOWED_HOSTS="*"
COPY --from=build --chown=nonroot:nonroot /app/conf /app/conf
COPY --from=build --chown=nonroot:nonroot /app/logs /app/logs
COPY --from=build --chown=nonroot:nonroot /app/db /app/db
COPY --from=build --chown=nonroot:nonroot /app/avalanchego/build /app/build
COPY --from=build --chown=nonroot:nonroot /out/entrypoint /app/entrypoint
EXPOSE ${STAKING_PORT}
EXPOSE ${HTTP_PORT}
VOLUME [ "${DB_DIR}" ]
VOLUME [ "${LOG_DIR}" ]
VOLUME [ "${CHAIN_CONFIG_DIR}" ]
ENTRYPOINT [ "/app/entrypoint" ]