use vendor

This commit is contained in:
canghai809 2020-03-26 22:42:57 +08:00
parent 0fd6176ac6
commit 16d505c622
3 changed files with 2 additions and 10 deletions

View File

@ -2,13 +2,7 @@ FROM golang AS builder
# RUN apk add --no-cache git gcc
WORKDIR /app
# comment this if using vendor
# ENV GOPROXY=https://mod.gokit.info
# COPY go.mod go.sum ./
# RUN go mod download
COPY . .
ENV GOPROXY=https://mod.gokit.info
RUN ./control build docker
FROM buildpack-deps:buster-curl

View File

@ -16,8 +16,6 @@ mkdir -p $GOPATH/src/github.com/didi
cd $GOPATH/src/github.com/didi
git clone https://github.com/didi/nightingale.git
cd nightingale
# 如果网络环境不好可以尝试aliyun的mirror
# export GOPROXY=https://mirrors.aliyun.com/goproxy/
./control build
```

View File

@ -136,13 +136,13 @@ status()
build_one()
{
mod=$1
go build -o n9e-${mod} --tags "md5" src/modules/${mod}/${mod}.go
go build -mod=vendor -o n9e-${mod} --tags "md5" src/modules/${mod}/${mod}.go
}
build_docker()
{
mod=$1
go build -o bin/n9e-${mod} --tags "md5" src/modules/${mod}/${mod}.go
go build -mod=vendor -o bin/n9e-${mod} --tags "md5" src/modules/${mod}/${mod}.go
}
build()