docker ps shows the running Docker *containers*

You should use:
docker inspect <image> --format "{{ .ContainerConfig.Labels }}"

Images labels doesn't propagate from a *image *to a *container* started
from it.

On Mon, Mar 18, 2019 at 7:22 PM 'Nicholas Bayle' via Packer <
[email protected]> wrote:

> I'm new to docker, so maybe this is just my ignorance, but does adding
> docker labels actually work with packer?
>
>   9   "builders": [{
>>  10     "type": "docker",
>>  11     "image": "ubuntu:18.04",
>>  12     "export_path": "output-docker/akm-{{user `akm_version`}}-u{{user
>> `u_version`}}-{{user `build_stamp`}}.tar",
>>  13     "changes": [
>>  14       "USER admin",
>>  15       "EXPOSE 6000 6001 6002 6003 5696",
>>  16       "LABEL com.townsend.version=1.0"
>>  17     ]
>>  18   }],
>>
>
> The resulting image has no labels.
>
> docker ps --format "table {{.ID}}\t{{.Labels}}"
>> CONTAINER ID        LABELS
>> 11b32092d884
>>
>
> Nick
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/CAGzi4%3D4w4um12GXPUbYiT%2BtUDMCkYBTNY%2B-VHpxMmoN%3D5QFjYQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/packer-tool/CAGzi4%3D4w4um12GXPUbYiT%2BtUDMCkYBTNY%2B-VHpxMmoN%3D5QFjYQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt9ybUaQ5V6A3Vto76kjB_%3DhXTGLNSq0SQA2rZTqG6hJdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to