In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
Today, the editor will share with you the relevant knowledge points about how to solve the Docker Push Skipped foreign layer error problem. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
Introduction
Skipped foreign layer will be encountered when Docker pushes Windows-based images to private repositories.
Error instance docker push 192.168.2.30:5000/iisThe push refers to a repository [192.168.2.30:5000/iis] 780cc29d7c04: Pushedce15af77227d: Pushed357bccc34a53: Pushed591455288d2b: Layer already exists3543301c85cf: Skipped foreign layerf358be10862c: Skipped foreign layer
As you can see above, you can push the layer you build, but not the base layer.
3543301c85cf: Skipped foreign layerf358be10862c: Skipped foreign layer error reason
It turns out that the distribution strategy set by Microsoft is mainly legal and copyright control.
Therefore, 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.
Solution method
Query all the values of the sha256 contained in the image through the command
Docker inspect-- format "{{.RootFS.layers}}" b5bc0a0e71bd# [sha256:d6fdd6832d95a5f537e0e7d87f2613ea9741ad9c20438b9d5a2697a883c4cd96 sha256:19d90b2bc7a17e712bc5028ff2b9169219fde003c778add8e96fc55292b63a87 sha256:f51d63faee188bc69aedea10aa92bc559e890501ad5ba1f46ed1aeca13c2f306 sha256:ac9eea650efbb2a1ed765b833e26b9dd916bebb5f0bd1e773fd14f513ed3bae8 sha256:782ac0aa877ddc6712d079928557ee2165d47b90d86299c6550052ec7631bc17 sha256:d9fea57f1ce4be203fbfd1119bffe09cfb9dfcd80f1ede9ac0562a38452ef5e3 sha256:490c4a3bf5af6b76774d7f18d20d7740f520540a0d422a4273d896b62892e60f sha256:bf23eac85558d71971421f9967942da738f1ecf798ccfdd1bbefdb13c90b2011 sha256:898d69ea39196cc3c4992f81f8213e9ce0bc2bd950cc9c53dc819299146f1172 sha256:95d145091b600af63e5b54ecae0ea8c1fca42f956b2919a88d740593b11e3a73 sha256:b60a2e1a3d4b8de9beae01c10690fbe91712ccd7fb6d7b5f90c873ae0c42644f]
Query folders one by one according to the sha256 value obtained
Select-String-Pattern "d6fdd6832d95a5f537e0e7d87f2613ea9741ad9c20438b9d5a2697a883c4cd96"-Path "C:\ ProgramData\ docker\ image\ windowsfilter\ layerdb\ sha256\ *\ diff" # C:\ ProgramData\ docker\ image\ windowsfilter\ layerdb\ sha256\ d6fdd6832d95a5f537e0e7d87f2613ea9741ad9c20438b9d5a2697a883c4cd96\ diff:1:sha256:d6fdd6832d95a5f537e0e7d87f2613ea9741ad9c20438b9d5a2697a883c4cd96# may encounter this situation after execution # Select-String: Cannot find path'C:\ ProgramData\ docker\ image\ windowsfilter\ layerdb\ sha256' because it does not exist.# if you encounter this problem, you can open this text manually first. Folder C:\ ProgramData\ docker\ image\ windowsfilter\ layerdb\ sha256
Open the descriptor.json file in the folder and do the following
{"mediaType": "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip", "size": 252691002, "digest": "sha256:bce2fbc256ea437a87dadac2f69aabd25bed4f56255549090056c1131fad0277", "urls": ["https://go.microsoft.com/fwlink/?linkid=837858"]}"
Modify mediaType: remove foreign
Delete the urls node.
Finally, the result is as follows
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip"
"size": 252691002
"digest": "sha256:bce2fbc256ea437a87dadac2f69aabd25bed4f56255549090056c1131fad0277"
}
Tip: if you don't want to find it, you can modify descriptor.json folder by folder.
After the above processing, restart Docker. After that, it can be pushed to the private warehouse normally.
These are all the contents of this article entitled "how to solve Docker Push Skipped foreign layer error problems". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.