Use "--driver docker-container" network was timeout or reset peer when connect github or raw.github
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.3k
- Forks
- 1.5k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 48
Description
ISSUE
- Use "--driver docker-container" network was timeout or reset peer when connect github.com or raw.githubusercontent.com
- Use "--driver docker" network was OK when connect github.com or raw.githubusercontent.com
CODE
script:
- docker run --rm --privileged tonistiigi/binfmt --install all
- docker context create ctx-$ARCH-$CI_PROJECT_ID
- docker buildx create --name mybuilders --driver docker-container --use ctx-$ARCH-$CI_PROJECT_ID
- |
docker buildx build \
--load \
--builder mybuilders \
--build-arg FLUTTER_VERSION=$FLUTTER_VERSION \
--platform linux/${ARCH} \
--cache-from type=registry,ref=${TAG_NAME} \
--cache-to type=inline,mode=max \
--tag ${TAG_NAME} \
--network host \
--file Dockerfile \
--push .
ENVIROMENT
$ docker info
Client:
Version: 27.2.0
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.16.2
Path: /usr/local/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.29.2
Path: /usr/local/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 27.2.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 472731909fa34bd7bc9c087e4c27943f9835f111
runc version: v1.1.13-0-g58aa920
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 5.15.0-76-generic
Operating System: Alpine Linux v3.20 (containerized)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.58GiB
Name: runner-81syxtawp-project-104201-concurrent-0-bo3hvyq0
ID: c05a2[24](https://gitlab.gz.cvte.cn/tv-infrastructure/cicd/hub.image/flutter/-/jobs/963034#L24)0-b373-4bc2-920c-da8622e70000
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
1[27](https://gitlab.gz.cvte.cn/tv-infrastructure/cicd/hub.image/flutter/-/jobs/963034#L27).0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
FROM ubuntu:24.04
....
GITLAB-RUNNER: 17.02
tonistiigi/binfmt:latest
sha256:66e11bea77a5ea9d6f0fe79b57cd2b189b5d15b93a2bdb925be22949232e4e55
CHECK LIST
In Container:
-
✅ DNS
-
✅ ping & nslookup & dig
-
❎ curl
In Node:
- ✅ DNS
- ✅ ping & nslookup & dig
- ✅ curl
TRY FIXING
❎ CURL -V
Install ca-certificates
apt-get -y update \
&& apt-get -y install ca-certificates wget \
&& mkdir -p /usr/share/ca-certificates/cacert.org \
&& wget -P /usr/share/ca-certificates/cacert.org http://www.cacert.org/certs/root.crt http://www.cacert.org/certs/class3.crt \
&& update-ca-certificates
STILL ERROR.
❎ Custom Parameters
STILL ERROR.
✅ RESET "--driver" DEFAULT
But, "--driver docker " not support multi-platforms.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided docker buildx build commands with the docker-container and docker drivers, then compare connectivity to github.com and raw.githubusercontent.com inside the builder. Use the listed Docker, Buildx, GitLab Runner, and host environment details when testing. Done means the docker-container driver supports the reported multi-platform build without the timeout or reset-peer failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- build-system, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100