stillfox-lee opened a new issue, #1059:
URL: https://github.com/apache/apisix-ingress-controller/issues/1059

   Issue:
   When I use `make e2e-test-local`, docker push always fails with a timeout. 
But the network connection was work well.
   ```
   ❯ docker push localhost:5000/apache/apisix
   Using default tag: latest
   The push refers to repository [localhost:5000/apache/apisix]
   Get "http://localhost:5000/v2/": net/http: request canceled (Client.Timeout 
exceeded while awaiting headers)
   ❯ docker ps
   CONTAINER ID   IMAGE        COMMAND                  CREATED         STATUS  
       PORTS                                       NAMES
   7bbe20a61254   registry:2   "/entrypoint.sh /etc…"   6 minutes ago   Up 6 
minutes   0.0.0.0:5000->5000/tcp, :::5000->5000/tcp   kind-registry
   ❯ curl "http://localhost:5000/v2/";
   {}%
   ```
   
   Then, I dig into the script `kind-with-registry.sh` and find out something:
   First, it created a new registry by: 
   ```
     docker run \
       -d --restart=always -p "${reg_port}:5000" --name "${reg_name}" \
       registry:2
   ```
   
   When registry was created, it forword ipv4 only: 
   ```
   ❯ docker ps
   CONTAINER ID   IMAGE        COMMAND                  CREATED         STATUS  
       PORTS                                       NAMES
   7bbe20a61254   registry:2   "/entrypoint.sh /etc…"   6 minutes ago   Up 6 
minutes   0.0.0.0:5000->5000/tcp   kind-registry
   ```
   After the script execute `docker network connect "${kind_network}" 
"${reg_name}"`. The registry container will forword both ipv4 and ipv6:
   ```
   ❯ docker ps
   CONTAINER ID   IMAGE        COMMAND                  CREATED         STATUS  
       PORTS                                       NAMES
   7bbe20a61254   registry:2   "/entrypoint.sh /etc…"   6 minutes ago   Up 6 
minutes   0.0.0.0:5000->5000/tcp, :::5000->5000/tcp   kind-registry
   ```
   If registry container forward ipv4 only, docker push will work. If it 
forward both ipv4 and ipv6. Docker push will timeout.
   
   My environment:
   system: macOS 12.0.1
   docker: 
   ```
   ❯ docker version
   Client:
    Cloud integration: v1.0.24
    Version:           20.10.14
    API version:       1.41
    Go version:        go1.16.15
    Git commit:        a224086
    Built:             Thu Mar 24 01:49:20 2022
    OS/Arch:           darwin/arm64
    Context:           default
    Experimental:      true
   
   Server: Docker Desktop 4.8.2 (79419)
    Engine:
     Version:          20.10.14
     API version:      1.41 (minimum version 1.12)
     Go version:       go1.16.15
     Git commit:       87a90dc
     Built:            Thu Mar 24 01:45:44 2022
     OS/Arch:          linux/arm64
     Experimental:     false
    containerd:
     Version:          1.5.11
     GitCommit:        3df54a852345ae127d1fa3092b95168e4a88e2f8
    runc:
     Version:          1.0.3
     GitCommit:        v1.0.3-0-gf46b6ba
    docker-init:
     Version:          0.19.0
     GitCommit:        de40ad0
   ```
   kind:
   ```
   ❯ kind version
   kind v0.13.0 go1.17.3 darwin/arm64
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to