-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
HttpHeaders empty for build commands #45446
Comments
Does it work with Docker 23.0 uses buildx as default for docker build, which is also used by docker compose; I suspect here that buildx currently doesn't use this config, or it's not set if it's connecting directly using the BuildKit grpc API. |
Yes, it works with |
Thanks for testing that assumption!
Would you have an example of a plugin (and how / for what purpose the header would be used?). Is this to (e.g.) block
That looks to be what's reported in #43268 (but there may be other tickets). I seem to recall I've seen some work on this being done somewhere, but don't know what the status is. @tonistiigi @jedevc could one of you help fill in the blanks here? |
Buildx only uses the grpc endpoint. Only HTTP endpoints that are hit are
There are no known issues with a reproducer for this that I'm aware of in the latest releases. |
Its an in-house AuthZ plugin that we use, which verifies user identity and access based on a set of HTTP headers stored in the user's |
If this isn't intended to work with buildkit, may what's needed is a doc update to https://docs.docker.com/engine/reference/commandline/cli/.
|
Is it actually hitting the |
Actually, I'm seeing this for I'll check on the endpoints. |
Actually, I'm not able to reproduce the I'm seeing the issue consistently for endpoints |
Also, this setting appears to have no effect in
The daemon was restarted after updating the file. |
Description
For compose plugin 2.12.2 (maybe earlier), build commands fail to pass the
HttpHeaders
field to the engine from theconfig.json
file.HttpHeaders
is still present, but empty.This is also an issue for
docker build
, at least as recent as 23.0.4, but still working in 20.10.12.This breaks plugins that require information to be passed in header fields.
Reverting client to 20.10.12, while leaving engine at 23.0.4, fixes
docker build
but notdocker compose build
.Other docker commands appear to work without issues.
Reproduce
docker compose build
ordocker build
with a plugin installed that requiresHttpHeaders
.Expected behavior
All client commands pass the
HttpHeaders
field through to the engine for use by plugins.docker version
Client: Docker Engine - Community Version: 23.0.4 API version: 1.42 Go version: go1.19.8 Git commit: f480fb1 Built: Fri Apr 14 10:36:38 2023 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 23.0.4 API version: 1.42 (minimum version 1.12) Go version: go1.19.8 Git commit: cbce331 Built: Fri Apr 14 10:34:14 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.20 GitCommit: 2806fc1057397dbaeefbea0e4e17bddfbd388f38 runc: Version: 1.1.5 GitCommit: v1.1.5-0-gf19387a docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Additional Info
Operating System: CentOS 7.9
The text was updated successfully, but these errors were encountered: