You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/11/28 10:56:33 UTC

[shardingsphere-on-cloud] branch main updated: fix(build): fix docker build failed (#117)

This is an automated email from the ASF dual-hosted git repository.

zhaojinchao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shardingsphere-on-cloud.git


The following commit(s) were added to refs/heads/main by this push:
     new c467b9f  fix(build): fix docker build failed (#117)
c467b9f is described below

commit c467b9fb6b6c24c97929e4169d3efd33bedb28b0
Author: pierce <xu...@gmail.com>
AuthorDate: Mon Nov 28 18:56:27 2022 +0800

    fix(build): fix docker build failed (#117)
    
    * fix(build): fix docker build failed
    
    Signed-off-by: xuanyuan300 <xu...@gmail.com>
    
    * fix(build): Comments GOPROXY env in Dockerfile.
    
    Signed-off-by: xuanyuan300 <xu...@gmail.com>
    
    Signed-off-by: xuanyuan300 <xu...@gmail.com>
---
 shardingsphere-operator/build/Dockerfile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/shardingsphere-operator/build/Dockerfile b/shardingsphere-operator/build/Dockerfile
index e21a1c4..181cddd 100644
--- a/shardingsphere-operator/build/Dockerfile
+++ b/shardingsphere-operator/build/Dockerfile
@@ -21,17 +21,17 @@ FROM golang:1.17 as builder
 WORKDIR /workspace
 
 # Copy the Go Modules manifests
-COPY shardingsphere-operator/go.mod go.mod
-COPY shardingsphere-operator/go.sum go.sum
+COPY go.mod go.mod
+COPY go.sum go.sum
 # cache deps before building and copying source so that we don't need to re-download as much
 # and so that source changes don't invalidate our downloaded layer
-#ENV GOPROXY=https://goproxy.cn
+# ENV GOPROXY=https://goproxy.cn
 RUN go mod download
 
 # Copy the go source
-COPY shardingsphere-operator/main.go main.go
-COPY shardingsphere-operator/api api/
-COPY shardingsphere-operator/pkg pkg/
+COPY main.go main.go
+COPY api api/
+COPY pkg pkg/
 RUN mkdir -p certs && cd certs && openssl req -new -SHA256 -newkey rsa:2048 -nodes -keyout tls.key -out tls.csr -subj "/C=CN/ST=beijing/L=beijing/O=/OU=/" && openssl x509 -req -sha256 -days 365 -in tls.csr -signkey tls.key -out tls.crt
 # Build
 RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build  -ldflags "-w -s" -gcflags "-N -l" -a -o operator main.go