Get the App
SLTechnology News&Howtos  ›  Servers  › 

The reason why Skipped foreign layer appears in Docker push images

Shulou Source: shulou.com Published: 2022-06-02 06:55:33 09月27日 Update

Use the latest Registry to build a private Docker repository, but it appears when the image is pushed

C:\ Users\ Administrator > docker tag microsoft/iis 192.168.2.30:5000/iis

C:\ Users\ Administrator > docker push 192.168.2.30:5000/iis

The push refers to a repository [192.168.2.30:5000/iis]

780cc29d7c04: Pushed

Ce15af77227d: Pushed

357bccc34a53: Pushed

591455288d2b: Layer already exists

3543301c85cf: Skipped foreign layer

F358be10862c: Skipped foreign layer

Latest: digest: sha256:87a2af3e29845ada74286a30e0002d17f75b57675056385de404f9c3784a9d3e size: 1783

It was finally found that https://github.com/moby/moby/issues/27580

It turned out that it was the distribution strategy set by Microsoft, mainly legal and copyright control.

As you can see above, you can push the layer you build, but not the base layer.

3543301c85cf: Skipped foreign layer

F358be10862c: Skipped foreign layer

There is a debug that makes it clear:

Docker pull xxx.xxx.xxx.xxx:5000/windowsservercore (docker registry)

Time= "2016-11-21T08:45:42.009251300-08:00" level=debug msg= "pulling blob" sha256:d33fff6043a134da85e10360f9932543f1dfc0c3a22e1edd062aa9b088a86c5b ""

Time= "2016-11-21T08:45:42.009251300-08:00" level=debug msg= "pulling blob" sha256:9c7f9c7d9bc2915388ecc5d08e89a7583658285469d7325281f95d8ee279cc60 ""

Time= "2016-11-21T08:45:42.010254400-08:00" level=debug msg= "Pulling sha256:d33fff6043a134da85e10360f9932543f1dfc0c3a22e1edd062aa9b088a86c5b from foreign URL https://go.microsoft.com/fwlink/?linkid=834677"

Time= "2016-11-21T08:45:42.012253300-08:00" level=debug msg= "Pulling sha256:9c7f9c7d9bc2915388ecc5d08e89a7583658285469d7325281f95d8ee279cc60 from foreign URL https://go.microsoft.com/fwlink/?linkid=830340"

Time= "2016-11-21T08:54:53.022940200-08:00" level=debug msg= "Downloaded d33fff6043a1 to tempfile C:\ Users\ ADMINI~1\ AppData\ Local\ Temp\ 2\ GetImageBlob260816119"

It detects the foreign layers and pulls the blob & p_w_picpath from Microsoft site, it defeats the purpose of registry

It's clear here that forign layer comes from https://go.microsoft.com/fwlink/?linkid=834677 and https://go.microsoft.com/fwlink/?linkid=830340.

Important: so this situation means that the outer layer cannot be pushed, and the push to the private repository will be ignored, but it can be downloaded through the docker pull image, so there is a problem that all clients using this image must have access to the Internet.

Tags: Push mirror clear warehouse that is private company can pass foundation basic layer outer layer customer client that is to say when it is in law copyright policy. Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker macOS Redmi Linux OPPO Reno