I am trying to understand whether it is possible to read the metadata (Labels, in particular) properties of a container using a bash script.
For instance, if there is a Dockerfile like:
FROM busybox
LABEL abc = abc_value1
And, if I build and run an image based on the file above, like so:
docker build . -t image1
docker run -ti image1 /bin/bash
Is there any way to access the value of the "abc" label inside the bash shell? If so, how?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…