use vendor
This commit is contained in:
parent
0fd6176ac6
commit
16d505c622
|
@ -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
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
4
control
4
control
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue