forked from deso-protocol/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (26 loc) · 787 Bytes
/
Dockerfile
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
FROM alpine:latest AS core
RUN apk update && apk upgrade
RUN apk add --update bash cmake g++ gcc git make vips vips-dev
COPY --from=golang:1.23-alpine /usr/local/go/ /usr/local/go/
ENV PATH="/usr/local/go/bin:${PATH}"
WORKDIR /deso/src/core
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY bls bls
COPY cmd cmd
COPY collections collections
COPY consensus consensus
COPY desohash desohash
COPY lib lib
COPY migrate migrate
COPY scripts scripts
COPY test_data test_data
COPY main.go .
# build backend
RUN GOOS=linux go build -mod=mod -a -installsuffix cgo -o bin/core main.go
# create tiny image
FROM alpine:latest
RUN apk add --update vips-dev
COPY --from=core /deso/src/core/bin/core /deso/bin/core
ENTRYPOINT ["/deso/bin/core"]