forked from axelarnetwork/axelar-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.debug
54 lines (44 loc) · 1.93 KB
/
Dockerfile.debug
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
# syntax=docker/dockerfile:experimental
FROM golang:1.17.5 as debug
RUN groupadd -r -g 1001 axelard && useradd -m -r -u 1000 -g axelard axelard
WORKDIR /axelar
RUN chown -R axelard:axelard /axelar
RUN go get github.com/go-delve/delve/cmd/dlv
RUN git config --global url."[email protected]:axelarnetwork".insteadOf https://github.com/axelarnetwork
RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
COPY ./go.mod .
COPY ./go.sum .
RUN --mount=type=ssh go mod download
COPY . .
RUN make debug
RUN cp /axelar/bin/* /usr/local/bin
# The home directory of axelar-core where configuration/genesis/data are stored
ENV HOME_DIR /home/axelard
# Whether or not to start the REST server
ENV START_REST false
# Host name for tss daemon (only necessary for validator nodes)
ENV TOFND_HOST ""
# The keyring backend type https://docs.cosmos.network/master/run-node/keyring.html
ENV KEYRING_BACKEND test
# The chain ID
ENV AXELARD_CHAIN_ID axelar-testnet-lisbon-2
# The file with the peer list to connect to the network
ENV PEERS_FILE ""
# Path of an existing configuration file to use (optional)
ENV CONFIG_PATH ""
# A script that runs before launching the container's process (optional)
ENV PRESTART_SCRIPT ""
# The Axelar node's moniker
ENV NODE_MONIKER ""
# Should dlv wait for a debugger to attach to the rest server process before starting it?
ENV REST_CONTINUE true
# Should dlv wait for a debugger to attach to the axelard process before starting it?
ENV CORE_CONTINUE true
# Create these folders so that when they are mounted the permissions flow down
RUN mkdir /home/axelard/.axelar && chown axelard /home/axelard/.axelar
RUN mkdir /home/axelard/shared && chown axelard /home/axelard/shared
RUN mkdir /home/axelard/genesis && chown axelard /home/axelard/genesis
RUN mkdir /home/axelard/scripts && chown axelard /home/axelard/scripts
RUN mkdir /home/axelard/conf && chown axelard /home/axelard/conf
USER axelard
ENTRYPOINT ["/axelar/entrypoint.debug.sh"]