forked from oursky/likecoin-chain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (26 loc) · 830 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
FROM golang:1.16-buster as base
WORKDIR /
RUN mkdir -p ./likechain
COPY ./go.mod ./likechain/go.mod
COPY ./go.sum ./likechain/go.sum
WORKDIR /likechain
RUN go mod download
FROM base as builder
WORKDIR /likechain
COPY . .
ARG VERSION="fotan-1"
ARG COMMIT=""
RUN go build \
-ldflags "\
-X \"github.com/cosmos/cosmos-sdk/version.Name=likecoin-chain\" \
-X \"github.com/cosmos/cosmos-sdk/version.AppName=liked\" \
-X \"github.com/cosmos/cosmos-sdk/version.BuildTags=netgo ledger\" \
-X \"github.com/cosmos/cosmos-sdk/version.Version=${VERSION}\" \
-X \"github.com/cosmos/cosmos-sdk/version.Commit=${COMMIT}\" \
" \
-tags "netgo ledger" \
-o /go/bin/liked cmd/liked/main.go
FROM debian:buster
WORKDIR /usr/bin
RUN apt-get update && apt-get install -y curl
COPY --from=builder /go/bin/liked .