Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Support for building images with labels #4038

Closed
scic opened this issue Oct 18, 2016 · 2 comments
Closed

Proposal: Support for building images with labels #4038

scic opened this issue Oct 18, 2016 · 2 comments
Milestone

Comments

@scic
Copy link

scic commented Oct 18, 2016

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"
@scic scic changed the title Proposal: Support for building images label options Proposal: Support for building images with labels Oct 18, 2016
@lpalgarvio
Copy link

Depending on this one.

@dm17
Copy link

dm17 commented Mar 24, 2021

Would be nice to know a bit more about how this works. I'm trying to add some labels that inform the image how to use networking during build time... However, they seem to get added as image layers after the container comes up & needs them for its build process.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants