From 16d505c62287f89e2ac2196017e440257819a3cf Mon Sep 17 00:00:00 2001 From: canghai809 Date: Thu, 26 Mar 2020 22:42:57 +0800 Subject: [PATCH] use vendor --- Dockerfile | 6 ------ README_ZH.md | 2 -- control | 4 ++-- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index b89cab9c..4ee9fc83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/README_ZH.md b/README_ZH.md index 1a1b3140..2a0aba45 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -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 ``` diff --git a/control b/control index 95c87583..4a1e97d0 100755 --- a/control +++ b/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()