-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (26 loc) · 992 Bytes
/
Dockerfile
File metadata and controls
35 lines (26 loc) · 992 Bytes
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
FROM golang:alpine AS build-env
# Set up dependencies
ENV PACKAGES git build-base
# Set working directory for the build
WORKDIR /go/src/github.com/aerius-labs/scalerize
# Install dependencies
RUN apk add --update $PACKAGES
RUN apk add linux-headers
# Add source files
COPY . .
# Make the binary
RUN make build
RUN make localtestnet-example-config
RUN echo "completed testnet config"
# Final image
FROM alpine:3.17.3
# Install ca-certificates
RUN apk add --update ca-certificates jq bash curl
WORKDIR /
# Copy over binaries from the build-env
COPY --from=build-env /go/src/github.com/aerius-labs/scalerize/build/scalerized /usr/bin/scalerized
COPY --from=build-env /go/src/github.com/aerius-labs/scalerize/example-testnet example-testnet
COPY --from=build-env /go/src/github.com/aerius-labs/scalerize/start-testnet-node.sh start-testnet-node.sh
COPY --from=build-env /go/src/github.com/aerius-labs/scalerize/testing/files/jwt.hex jwt.hex
# Run scalerized by default
CMD ["scalerized"]