mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-22 06:46:46 +00:00
29 lines
660 B
Docker
29 lines
660 B
Docker
FROM golang:1.12-alpine
|
|
|
|
ENV PATH="${GOPATH}/bin:${PATH}"
|
|
|
|
RUN mkdir -p /go/src/github.com/daglabs/btcd
|
|
|
|
WORKDIR /go/src/github.com/daglabs/btcd
|
|
|
|
RUN apk add --no-cache curl git openssh binutils gcc musl-dev tini bash
|
|
# Allow delve to run on Alpine based containers.
|
|
RUN apk add --no-cache libc6-compat
|
|
|
|
RUN go get github.com/derekparker/delve/cmd/dlv
|
|
|
|
# GO111MODULE=on forces Go to use the go-module system
|
|
# TODO: remove this once Go 1.13 is released
|
|
ENV GO111MODULE=on
|
|
|
|
COPY go.mod .
|
|
COPY go.sum .
|
|
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -gcflags "all=-N -l" -a -installsuffix cgo -o btcd .
|
|
|
|
ENTRYPOINT [ "/sbin/tini", "--" ]
|