简体   繁体   中英

Docker push: Force Push All Layers?

Does docker push possess a --force flag which forces all layers to be pushed to the repository, regardless of whether the repository believes those layers are unchanged?

Thank you!

No, there's no --force option to docker push . You can see the options by running docker push --help .

The only reason to force push blobs is if the registry is broken or you've encountered a sha256 hash collision within your repository. I've yet to see a hash collision in app my time using docker. And if the registry is broken, you can delete the affected images from the server and push them again, but I'd put more effort into preventing whatever is corrupting your registry.

If this is an XY problem, and you're just not seeing your changes, use unique tags to ensure your image is being pulled. If your builds are being cached, try building with --no-cache . And realize the container images are based on a content addressable store, so you won't have different content represented by the same digest.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM