❯ sudo docker build -t copilot-gpt4-service .
Password:
Sorry, try again.
Password:
[+] Building 172.1s (13/14) docker:rancher-desktop
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 581B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for
docker.io/library/golang:latest 3.5s
=> [internal] load metadata for
docker.io/library/alpine:latest 3.5s
=> [auth] library/alpine:pull token for
registry-1.docker.io 0.0s
=> [auth] library/golang:pull token for
registry-1.docker.io 0.0s
=> [builder 1/4] FROM
docker.io/library/golang:latest@sha256:672a2286da3ee7a854c3e0a56e0838918d0dbb1c18652992930293312de898a6 0.0s
=> [stage-1 1/3] FROM
docker.io/library/alpine:latest@sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 48.47kB 0.0s
=> CACHED [stage-1 2/3] WORKDIR /app 0.0s
=> CACHED [builder 2/4] WORKDIR /app 0.0s
=> [builder 3/4] COPY . . 0.0s
=> ERROR [builder 4/4] RUN CGO_ENABLED=0 GOOS=linux go build -o myapp . 168.5s
------
> [builder 4/4] RUN CGO_ENABLED=0 GOOS=linux go build -o myapp .:
0.232 go: downloading
github.com/gin-gonic/gin v1.7.4
168.5 utils/utils.go:13:3:
github.com/gin-gonic/[email protected]: Get "
https://goproxy.cn/github.com/gin-gonic/gin/@v/v1.7.4.zip": net/http: TLS handshake timeout
------
Dockerfile:13
--------------------
11 |
12 | # 构建应用程序
13 | >>> RUN CGO_ENABLED=0 GOOS=linux go build -o myapp .
14 |
15 | # 第二阶段:运行阶段
--------------------
ERROR: failed to solve: process "/bin/sh -c CGO_ENABLED=0 GOOS=linux go build -o myapp ." did not complete successfully: exit code: 1
有大佬指点一下吗?我一直卡在这里