-
Notifications
You must be signed in to change notification settings - Fork 16
Add instructions for docker-compose.yml #9
Comments
Thanks for raising this and I did some experimenting with the label support in Compose. These labels are added to the containers created by Compose. But they aren't added to any images built by Compose. To add labels to an image you need to add them in the Dockerfile. V1 of label schema only covers build time labels. But runtime labels will be covered in a future version. I like the idea of having a page with how to use label schema with widely used tools like Compose. |
There is an issue for this in Docker Compose, The Docker Compose YAML file allows for building images with it, but is omitting the labels for images it builds, even though labels for Volumes and Networks are already supported. |
Proposal: Support for building images with labels #4038 is fixed. Support for Composer format 2.x is pending. |
This last issue has been fixed and closed. Labels can now be included in composer files for any kind of resource, including for builds. |
As per
https://docs.docker.com/compose/compose-file/
Example:
The text was updated successfully, but these errors were encountered: