-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add support for labels during build #4735
Conversation
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
486a5a8
to
c5a5ad4
Compare
I'm not 100% sure that's the best way to write the test. I also used this in my dev environment to make sure it works: docker-compose.yaml version: '3.2'
services:
web:
build:
context: .
labels:
test: blah
test2: test Dockerfile
Execution
|
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
Thanks! I think if you want to add something to the v3 format, you should submit a PR in the Engine repo first - they're the source of truth as far as v3 is concerned. |
Uh? That sounds a bit.. unwieldy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@shin- would it be possible to get this one merged for the next release? |
Ah yes, sorry - it just needs to be moved to the new 3.3 schema as per moby/moby#32972 |
I see, how do you suggest we proceed? Also note that the schemas now live in docker/cli due to moby/moby#32694; see docker/cli#32 to get 3.3 in docker-cli @shin-, @dnephin, should a different approach be devised here, where schemas would be held in a different repository which is "git submoduled" into both the cli and the compose project? To avoid divergence of the schemas between the two projects? |
I don't think we are at a point where submodule would actually improve the workflow here. The reorganization at the engine level with the new Moby project and the docker/cli project split has caused this process to be a bit more involved than usual, but it's not the norm. Either way: Merged via #4858 |
Adds support for labels when building an images.
cf.
https://github.com/docker/docker-py/blob/0a97df1abc7236793b82041626088f54ad8d204f/docker/api/build.py#L94
Fixes #4038