From acf70602ffc04735f1c6e031f19ffc491e2438a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E9=AD=82?= Date: Thu, 13 Dec 2018 19:48:37 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=AD=A3go-src=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E9=94=99=E8=AF=AF.=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E5=BA=94=E8=AF=A5=E4=B8=BA:https://dl.google.com/go/goxxxxx.sr?= =?UTF-8?q?c.tar.gz=20=E5=8F=82=E8=80=83:https://blog.csdn.net/warrially/a?= =?UTF-8?q?rticle/details/79879119?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2.修正Dockerfile构建失败. 原因: 不知道作者为什么写的时候丢失了镜像名称,不知道为什么多了个build.更搞不清楚为什么这个Dockerfile写的如此复杂,我也懒得简化它了,只修正问题吧... --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e2a5099..553d258 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,7 +39,7 @@ RUN set -eux; \ x86) export GO386='387' ;; \ esac; \ \ - wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"; \ + wget -O go.tgz "https://dl.google.com/go/go$GOLANG_VERSION.src.tar.gz"; \ echo '567b1cc66c9704d1c019c50bef946272e911ec6baf244310f87f4e678be155f2 *go.tgz' | sha256sum -c -; \ tar -C /usr/local -xzf go.tgz; \ rm go.tgz; \ @@ -76,7 +76,7 @@ RUN apk update; apk upgrade; \ CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w" -a -installsuffix cgo -o proxy; \ chmod 0777 proxy -FROM 1.10.3-stretch +FROM golang:1.10.3-stretch RUN mkdir /proxy && chmod 0777 /proxy -COPY --from=builder builder /go/src/github.com/snail007/goproxy/proxy /proxy/ +COPY --from=builder /go/src/github.com/snail007/goproxy/proxy /proxy/ CMD cd /proxy && /proxy ${OPTS} \ No newline at end of file