Search code examples
windowsdockerartifactory

Artifactory and Docker for Windows - Pushes Slow Then Fail Most of Time


Over the past 6 months, we've used Docker for Windows to build both Linux and Windows container images.

We just started building the images far more often, and we now find that the docker push commands are failing very often. Many of the small layers upload successfully, although they go very slow, and have to be retried several times. Eventually though, the bigger layers retry over and over and never succeed. I've let them go for over an hour on a 2 GB image and it still never finished so I cancelled. This is all local LAN, superfast, no WAN. As a result, currently, we have to build the Linux images from Dockerfile on every place they are used.

It used to be the case that pushes of Windows images failed. Now it seems that pushes of Linux images are failing to push, and Windows images push just fine. I've tried from 4 separate Docker hosts, all fail to upload in the same way.

When I build the exact same Linux images on a Linux host, and push to Artifactory, it works with no problem.

For a long time, i thought it was something with NGinx. But, since the Linux host upload works fine, I now think it's some difficult to isolate nuance between:

Docker for Windows
NGinx
Artifactory

I found some other posts about the topic in a general sense, most seemed old/resolved/different, or related to basic support of Windows containers.

Feedback welcome, thanks.

Environment:

Windows 10 10.0.17134  
Docker CE: Version 18.06.1-ce-win73 (19507) (Stable)  
Artifactory Version 6.3.2  

reproduce:

docker pull centos/python-36-centos7
docker tag centos/python-36-centos7 my_artifactory_server/docker/centos/python-36-centos7
docker push my_artifactory_server/docker/centos/python-36-centos7

After 3 minutes, here is my progress:

5bef68a04db7: Retrying in 1 second
0ef705c3d148: Pushing [==================================================>]  262.7kB/262.7kB
ef9db94a65b7: Pushing [==================================================>]  262.7kB/262.7kB
832dfe5d9c79: Pushing [====>                                              ]  19.34MB/226.8MB
4a45879b2884: Pushing [====>                                              ]  33.58MB/377MB
20a61b68701f: Pushing [==================================================>]  3.408MB/3.408MB
0bb055614aec: Pushing [==================================================>]  262.7kB/262.7kB
84293cc95fdf: Pushing [==================================================>]  38.27MB/38.27MB
f972d139738d: Pushing [==========>                                        ]  62.24MB/297MB

Solution

  • This was clearly all due to various nuances of LCOW not behaving the same as Linux hosts in various capacities. Since Docker on Windows is being completely redesigned to work with WSL2 and LCOW itself is going to be deprecated, I'm saying that the solution is to move to WSL2 when it's available and never expect this work. Suggest locking the thread.