File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed
Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ debug_container.log
33.scalerized
44example-testnet
55build
6+ * .env
Original file line number Diff line number Diff line change 5757
5858localtestnet-example-config :
5959 $(SCALERIZED_BINARY_PATH ) testnet init-files --output-dir example-testnet --v $(NODES ) --starting-ip-address $(STARTING-IP-ADDR ) --keyring-backend test
60+
61+ localtestnet-config :
62+ @echo " Loading environment variables from localtestnet.env"
63+ @set -a && . ./localtestnet.env && set +a && \
64+ $(SCALERIZED_BINARY_PATH ) testnet init-files --output-dir example-testnet --v $(NO-OF-NODES ) --ip-addresses $(IP-ADDRESSES ) --keyring-backend test
Original file line number Diff line number Diff line change 1+ FROM golang:alpine AS build-env
2+
3+ # Set up dependencies
4+ ENV PACKAGES git build-base
5+
6+ # Set working directory for the build
7+ WORKDIR /go/src/github.com/aerius-labs/scalerize
8+
9+ # Install dependencies
10+ RUN apk add --update $PACKAGES
11+ RUN apk add linux-headers
12+
13+ # Add source files
14+ COPY . .
15+
16+ # Make the binary
17+ RUN make build
18+ RUN make localtestnet-config
19+ RUN echo "completed testnet config"
20+
21+ # Final image
22+ FROM alpine:3.17.3
23+
24+ # Install ca-certificates
25+ RUN apk add --update ca-certificates jq bash curl
26+ WORKDIR /
27+
28+ # Copy over binaries from the build-env
29+ COPY --from=build-env /go/src/github.com/aerius-labs/scalerize/build/scalerized /usr/bin/scalerized
30+ COPY --from=build-env /go/src/github.com/aerius-labs/scalerize/example-testnet example-testnet
31+ COPY --from=build-env /go/src/github.com/aerius-labs/scalerize/start-testnet-node.sh start-testnet-node.sh
32+ COPY --from=build-env /go/src/github.com/aerius-labs/scalerize/testing/files/jwt.hex jwt.hex
33+ COPY --from=build-env /go/src/github.com/aerius-labs/scalerize/scripts/init.sh ./init.sh
34+
35+ # Run scalerized by default
36+ CMD ["scalerized" ]
You can’t perform that action at this time.
0 commit comments