You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... the documentation does not mention anything about my problem
... there are no open or closed issues that are related to my problem
Description
If the docker config file path is permission denied, somehow docker build / buildx build gives an "unknown flag: --tag" error.
Expected behaviour
It should accept the --tag operator and build even though the docker config is permission denied - unless we want to make the permission denied a fatal error. But I feel it should be consistent with the file not existing.
Right now it's really confusing.
Actual behaviour
$ DOCKER_CONFIG=/root/.docker /usr/bin/docker buildx build --tag=mytag .
WARNING: Error loading config file: open /root/.docker/config.json: permission denied
unknown flag: --tag
See 'docker --help'.
Usage: docker [OPTIONS] COMMAND
A self-sufficient runtime for containers
per-user plugins are installed inside the config-directory, so if buildx is only present inside ~/.docker/cli-plugins/ then switching the config-directory may mean that buildx is not installed.
The fact that it doesn't produce an error when the config-dir is missing, is that the config files are optional; ideally the WARNING should be a fatal error (i.e., if a config-file was found, but we're not able to read it); I'd have to check why that's not the case though. Some related tickets; the last one is related to the "unknown flag" error (instead of printing "unknown command");
Contributing guidelines
I've found a bug and checked that ...
Description
If the docker config file path is permission denied, somehow docker build / buildx build gives an "unknown flag: --tag" error.
Expected behaviour
It should accept the --tag operator and build even though the docker config is permission denied - unless we want to make the permission denied a fatal error. But I feel it should be consistent with the file not existing.
Right now it's really confusing.
Actual behaviour
But this works:
If DOCKER_CONFIG is just non existent, it's not a problem:
Buildx version
github.com/docker/buildx v0.16.2 99dea6d
Docker info
Builders list
Configuration
FROM alpine
Build logs
Additional info
This isn't something I intended to do, but ended up in an environment where the user running docker had a docker config pointing to /root.
Took me awhile to figure out the warning was the issue with "--tag" not being recognized.
The text was updated successfully, but these errors were encountered: