Score:0

finding docker images with tag and name

ms flag

when I do docker images I have below docker images as list where there are images with multiple tag and also image with latest tag value.

REPOSITORY                            TAG                 IMAGE ID            CREATED             SIZE
m1                                  latest              40febdb010b1        15 minutes ago      479MB
m2                                    130                 fab5a122127a        4 weeks ago         2.74GB
m2                                    115                 5a2ee5c5f5e5        4 weeks ago         818MB
m3                                    111                 dd91a7f68e3d        5 weeks ago         818MB
m3                                     23                  0657662756f6        5 weeks ago         2.22GB
m4                                     23                  0657662756f6        5 weeks ago         2.22GB

While I do for i in {docker image save -o <imagename>.tar} I would like to only save the images as tar for the tag with higher numbers but except any docker image with latest tag and docker image name as m4 How this can be achieved in one liner command.

Score:0
cn flag

As documentation say, you can simply use the <image>:<tag> syntax.

For exemple : docker save -o fedora-latest.tar fedora:latest

You can compress it with gzip with the gollowing in order to get a .tar.gz image :

docker save myimage:latest | gzip > myimage_latest.tar.gz
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.