When I query docker images
, I get this:
#> docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
local/debian 7.5 172c7702a46f 2 weeks ago 175.1 MB
local/debian wheezy 172c7702a46f 2 weeks ago 175.1 MB
Using grep
I extract the image tags:
#> docker images | grep -oP '\S+(?=\s+172c7702a46f)'
7.5
wheezy
How can I refine this to get wheezy
only and avoid anything that matches \d+\.\d+
?