如何一次从Docker存储库中提取所有Docker容器映像? [英] How to Pull all docker container images from docker repo at once?
本文介绍了如何一次从Docker存储库中提取所有Docker容器映像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个私人docker存储库,其中存储了10个容器映像。我想将所有图像拖到机器上。有没有办法我可以用一个命令从存储库中提取所有图像?诸如
I have a private docker repo in which i have 10 container images stored. I want to pull all images to a machine. is there a way i can pull all images from a repo with a single command? some command like
docker pull xx.xx.com/reponame/*
在研究的同时,我发现了拉出单个图像所有标签的方法。但到目前为止,在所有图像上都没有运气
while researching I found ways to pull all tags of a single image; but no luck so far on all images
推荐答案
尝试一下(它将更新未直接连接运行容器的图像)
Try this (it will update images that does not have running containers directly attached to them)
docker images | awk '(NR>1) && ($2!~/none/) {print $1":"$2}' | xargs -L1 docker pull
首先试用此行,以查看将要覆盖的图像:
Try out this line out first to see what images will be covered:
docker images | awk '(NR>1) && ($2!~/none/) {print $1":"$2}'
这篇关于如何一次从Docker存储库中提取所有Docker容器映像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文