Sfoglia il codice sorgente

Fixing examples given for labels

Fixes #12892

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Vincent Demeester 10 anni fa
parent
commit
424a544bb5
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5 1
      docs/sources/userguide/labels-custom-metadata.md

+ 5 - 1
docs/sources/userguide/labels-custom-metadata.md

@@ -129,10 +129,14 @@ You can view the labels via the `docker inspect` command:
     }
     }
     ...
     ...
 
 
-    $ docker inspect -f "{{json .Labels }}" 4fa6e0f0c678
+    # Inspect labels on container
+    $ docker inspect -f "{{json .Config.Labels }}" 4fa6e0f0c678
 
 
     {"Vendor":"ACME Incorporated","com.example.is-beta":"","com.example.version":"0.0.1-beta","com.example.release-date":"2015-02-12"}
     {"Vendor":"ACME Incorporated","com.example.is-beta":"","com.example.version":"0.0.1-beta","com.example.release-date":"2015-02-12"}
 
 
+    # Inspect labels on images
+    $ docker inspect -f "{{json .ContainerConfig.Labels }}" myimage
+
 
 
 ## Query labels
 ## Query labels