-
Notifications
You must be signed in to change notification settings - Fork 36
/
Dockerfile.arm64
71 lines (52 loc) · 1.98 KB
/
Dockerfile.arm64
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
63
64
65
66
67
68
69
70
71
# ------------------------------------------------------------------------------
# Build avalanche
# ------------------------------------------------------------------------------
FROM arm64v8/golang:1.21.7-bullseye AS avalanche
ARG AVALANCHE_VERSION
RUN git clone https://github.com/ava-labs/avalanchego.git \
/go/src/github.com/ava-labs/avalanchego
WORKDIR /go/src/github.com/ava-labs/avalanchego
RUN git checkout $AVALANCHE_VERSION && \
./scripts/build.sh
# ------------------------------------------------------------------------------
# Build avalanche rosetta
# ------------------------------------------------------------------------------
FROM arm64v8/golang:1.21.7-bullseye AS rosetta
ARG ROSETTA_VERSION
RUN git clone https://github.com/ava-labs/avalanche-rosetta.git \
/go/src/github.com/ava-labs/avalanche-rosetta
WORKDIR /go/src/github.com/ava-labs/avalanche-rosetta
RUN git checkout $ROSETTA_VERSION && \
go mod download
RUN \
GO_VERSION=$(go version | awk {'print $3'}) \
GIT_COMMIT=$(git rev-parse HEAD) \
make build
# ------------------------------------------------------------------------------
# Target container for running the node and rosetta server
# ------------------------------------------------------------------------------
FROM arm64v8/ubuntu:20.04
# Install dependencies
RUN apt-get update -y && \
apt-get install -y wget
WORKDIR /app
# Install avalanche daemon
COPY --from=avalanche \
/go/src/github.com/ava-labs/avalanchego/build/avalanchego \
/app/avalanchego
# Install rosetta server
COPY --from=rosetta \
/go/src/github.com/ava-labs/avalanche-rosetta/rosetta-server \
/app/rosetta-server
# Install rosetta runner
COPY --from=rosetta \
/go/src/github.com/ava-labs/avalanche-rosetta/rosetta-runner \
/app/rosetta-runner
# Install service start script
COPY --from=rosetta \
/go/src/github.com/ava-labs/avalanche-rosetta/docker/entrypoint.sh \
/app/entrypoint.sh
EXPOSE 9650
EXPOSE 9651
EXPOSE 8080
ENTRYPOINT ["/app/entrypoint.sh"]