Skip to content

Proposal: Support for building images with labels #4038

@scic

Description

@scic

Currently docker-compose supports to add labels to containers. But we with pure docker we can add labels to images with docker build --label mylabel . (https://docs.docker.com/engine/reference/commandline/build/)
Since we recently also gained support for labelling networks and volumes: #3898 I suggest to implement this for building images as well.

It could look like this:

version: '2'
services:
  myservice:
    build:
      context: .
      labels:
        - mylabelOne= "labelTextOne"
        - mylabelTwo= "labelTextTwo"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions