-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.devnet
45 lines (35 loc) · 1.55 KB
/
Dockerfile.devnet
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
# Stage 1: Download precompiled avalanchego
ARG INSTALL_AVALANCHEGO_VERSION_SHORT=d366a137
FROM avaplatform/avalanchego:${INSTALL_AVALANCHEGO_VERSION_SHORT} AS avalanchego
# Stage 2: Prepare a Go environment with hypersdk
FROM golang:1.22-bookworm AS hypersdk-downloader
# Install dependencies and tools
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y \
curl git && apt clean && rm -rf /var/lib/apt/lists/*
# Set working directory and Go mod cache path
WORKDIR /app
ENV GOMODCACHE=/go/pkg/mod
# Copy the avalanchego binary from the first stage
COPY --from=avalanchego /avalanchego/build/avalanchego /root/.hypersdk/avalanchego-v1.11.12-rc.2/avalanchego
# Install Ginkgo for testing
RUN go install github.com/onsi/ginkgo/v2/ginkgo@v2.13.1
# Copy project files to the build context
COPY go.mod go.sum ./
COPY ./actions ./actions
COPY ./cmd ./cmd
COPY ./config ./config
COPY ./consts ./consts
COPY ./dataset ./dataset
COPY ./emission ./emission
COPY ./genesis ./genesis
COPY ./scripts ./scripts
COPY ./storage ./storage
COPY ./tests ./tests
COPY ./utils ./utils
COPY ./vm ./vm
# Build the application binary (if needed for your project)
RUN go mod download && go mod verify
# Optional: If your project builds a Go binary, compile it
# Uncomment this if you have a main package to build.
# RUN go build -o /app/nuklaivm ./cmd/nuklaivm
CMD ["bash", "-c", "./scripts/run.sh --initial-owner-address \"$INITIAL_OWNER_ADDRESS\" --emission-address \"$EMISSION_ADDRESS\" --external-subscriber-server-address \"$EXTERNAL_SUBSCRIBER_SERVER_ADDRESS\" && tail -f /dev/null"]