-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35229 from sethmccombs/merged-main-dev-1.25
Merge main into dev-1.25 branch: July 21st
- Loading branch information
Showing
135 changed files
with
14,968 additions
and
2,037 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -257,6 +257,51 @@ This works for Catalina as well as Mojave macOS. | |
--> | ||
这适用于 Catalina 和 Mojave macOS。 | ||
|
||
### 对执行 make container-image 命令部分地区访问超时的故障排除 | ||
|
||
现象如下: | ||
|
||
```shell | ||
langs/language.go:23:2: golang.org/x/[email protected]: Get "https://proxy.golang.org/golang.org/x/text/@v/v0.3.7.zip": dial tcp 142.251.43.17:443: i/o timeout | ||
langs/language.go:24:2: golang.org/x/[email protected]: Get "https://proxy.golang.org/golang.org/x/text/@v/v0.3.7.zip": dial tcp 142.251.43.17:443: i/o timeout | ||
common/text/transform.go:21:2: golang.org/x/[email protected]: Get "https://proxy.golang.org/golang.org/x/text/@v/v0.3.7.zip": dial tcp 142.251.43.17:443: i/o timeout | ||
common/text/transform.go:22:2: golang.org/x/[email protected]: Get "https://proxy.golang.org/golang.org/x/text/@v/v0.3.7.zip": dial tcp 142.251.43.17:443: i/o timeout | ||
common/text/transform.go:23:2: golang.org/x/[email protected]: Get "https://proxy.golang.org/golang.org/x/text/@v/v0.3.7.zip": dial tcp 142.251.43.17:443: i/o timeout | ||
hugolib/integrationtest_builder.go:29:2: golang.org/x/[email protected]: Get "https://proxy.golang.org/golang.org/x/tools/@v/v0.1.11.zip": dial tcp 142.251.42.241:443: i/o timeout | ||
deploy/google.go:24:2: google.golang.org/[email protected]: Get "https://proxy.golang.org/google.golang.org/api/@v/v0.76.0.zip": dial tcp 142.251.43.17:443: i/o timeout | ||
parser/metadecoders/decoder.go:32:2: gopkg.in/[email protected]: Get "https://proxy.golang.org/gopkg.in/yaml.v2/@v/v2.4.0.zip": dial tcp 142.251.42.241:443: i/o timeout | ||
The command '/bin/sh -c mkdir $HOME/src && cd $HOME/src && curl -L https://github.com/gohugoio/hugo/archive/refs/tags/v${HUGO_VERSION}.tar.gz | tar -xz && cd "hugo-${HUGO_VERS ION}" && go install --tags extended' returned a non-zero code: 1 | ||
make: *** [Makefile:69:container-image] error 1 | ||
``` | ||
|
||
请修改 `Dockerfile` 文件,为其添加网络代理。修改内容如下: | ||
|
||
```dockerfile | ||
... | ||
FROM golang:1.18-alpine | ||
|
||
LABEL maintainer="Luc Perkins <[email protected]>" | ||
|
||
ENV GO111MODULE=on # 需要添加内容1 | ||
|
||
ENV GOPROXY=https://proxy.golang.org,direct # 需要添加内容2 | ||
|
||
RUN apk add --no-cache \ | ||
curl \ | ||
gcc \ | ||
g++ \ | ||
musl-dev \ | ||
build-base \ | ||
libc6-compat | ||
|
||
ARG HUGO_VERSION | ||
... | ||
``` | ||
|
||
将 "https://proxy.golang.org" 替换为本地可以使用的代理地址。 | ||
|
||
**注意:** 此部分仅适用于中国大陆 | ||
|
||
<!-- | ||
## Get involved with SIG Docs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.