docker tag microsoft/iis 192.168.2.30:5000/iisC:\Users\Adm..."/>
溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

Docker push images出現(xiàn)Skipped foreign layer的原因

發(fā)布時(shí)間:2020-08-07 10:45:49 來(lái)源:網(wǎng)絡(luò) 閱讀:2318 作者:rong341233 欄目:建站服務(wù)器

利用最新的Registry去搭建Docker私有倉(cāng)庫(kù),但是在推送鏡像的時(shí)候出現(xiàn)

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


經(jīng)過(guò)最后發(fā)現(xiàn)https://github.com/moby/moby/issues/27580

原來(lái)是微軟公司設(shè)置的發(fā)行策略,主要是法律及版權(quán)控制


上面可以看出,你可以推送自己構(gòu)建的層,但是無(wú)法推送基礎(chǔ)層。

3543301c85cf: Skipped foreign layer

f358be10862c: Skipped foreign layer


有一個(gè)debug說(shuō)明的很清楚:

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 URLhttps://go.microsoft.com/fwlink/?linkid=834677"
time="2016-11-21T08:45:42.012253300-08:00" level=debug msg="Pulling sha256:9c7f9c7d9bc2915388ecc5d08e89a7583658285469d7325281f95d8ee279cc60 from foreign URLhttps://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



這里就很清楚了,forign layer都是來(lái)自于https://go.microsoft.com/fwlink/?linkid=834677以及https://go.microsoft.com/fwlink/?linkid=830340


重點(diǎn):所以出現(xiàn)這種情況就是說(shuō)無(wú)法推送外層,推送至私有倉(cāng)庫(kù)會(huì)被忽略,但是可以通過(guò)docker pull鏡像進(jìn)行下載,這樣就有一個(gè)問(wèn)題就是所有使用這個(gè)鏡像的客戶端必須要可以上網(wǎng)

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI