github.com/deso-protocol/core@v1.2.9/Dockerfile (about)

     1  FROM alpine:latest AS core
     2  
     3  RUN apk update && apk upgrade
     4  RUN apk add --update go gcc g++ vips vips-dev
     5  
     6  WORKDIR /deso/src/core
     7  
     8  COPY go.mod .
     9  COPY go.sum .
    10  
    11  RUN go mod download
    12  
    13  COPY desohash desohash
    14  COPY cmd       cmd
    15  COPY lib       lib
    16  COPY migrate   migrate
    17  COPY test_data test_data
    18  COPY main.go   .
    19  
    20  # build backend
    21  RUN GOOS=linux go build -mod=mod -a -installsuffix cgo -o bin/core main.go
    22  
    23  # create tiny image
    24  FROM alpine:edge
    25  
    26  RUN apk add --update vips-dev
    27  
    28  COPY --from=core /deso/src/core/bin/core /deso/bin/core
    29  
    30  ENTRYPOINT ["/deso/bin/core"]