mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
[NOD-119] Add a call to "go mod download" before copying all files in Dockerfiles. (#255)
This commit is contained in:
parent
b612426ead
commit
311c96122e
@ -12,12 +12,17 @@ RUN go get -u golang.org/x/lint/golint \
|
||||
github.com/opennota/check/cmd/structcheck \
|
||||
github.com/opennota/check/cmd/varcheck
|
||||
|
||||
COPY . .
|
||||
|
||||
# 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 go vet ./...
|
||||
# RUN aligncheck ./...
|
||||
# RUN structcheck -e ./...
|
||||
|
@ -12,12 +12,17 @@ RUN go get -u golang.org/x/lint/golint \
|
||||
github.com/opennota/check/cmd/structcheck \
|
||||
github.com/opennota/check/cmd/varcheck
|
||||
|
||||
COPY . .
|
||||
|
||||
# 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 TEST_DIRS=`go list -f {{.Dir}} ./... | grep -v /vendor/` GOFMT_RESULT=`gofmt -l $TEST_DIRS`; echo $GOFMT_RESULT; test -z "$GOFMT_RESULT"
|
||||
RUN go vet ./...
|
||||
RUN TEST_DIRS=`go list -f {{.Dir}} ./... | grep -v /vendor/` golint -set_exit_status $TEST_DIRS
|
||||
|
@ -12,12 +12,17 @@ RUN apk add --no-cache libc6-compat
|
||||
|
||||
RUN go get github.com/derekparker/delve/cmd/dlv
|
||||
|
||||
COPY . .
|
||||
|
||||
# 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", "--" ]
|
||||
|
@ -7,12 +7,17 @@ WORKDIR /go/src/github.com/daglabs/btcd
|
||||
|
||||
RUN apk add --no-cache curl git
|
||||
|
||||
COPY . .
|
||||
|
||||
# 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 cd mining/simulator && CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o mining_simulator .
|
||||
|
||||
# --- multistage docker build: stage #2: runtime image
|
||||
|
Loading…
x
Reference in New Issue
Block a user