Comments (7)
Should we add a check for now; ie if a dockerfile with ARG
is detected and DCT is enabled, error out with a proper error?
from buildkit.
Hello, just wanted to add that it would be amazing if this error message can be improved. I just spent precious time debugging for this issue as the error message really does not point to an authorization issue as it should. When replacing the ARG variable in the FROM instruction with the actual image I wanted to alias, I received the right error message 401 (you are not authorized...), but when using the ARG variable it returns this invalid reference format error.
IMHO the API should return the same 401 unauthorized error no matter what value it has in the FROM instruction (ARG variable or actual string) as long as the resulting image from the value is unsigned or has an untrusted signature.
from buildkit.
cc @tonistiigi
reported in LinuxKit linuxkit/linuxkit#2244
from buildkit.
I remember this came up as a conflicting feature on the original proposal issue for this feature. We should at least improve the docs. There was a discussion 3-4 months ago to move the trust validation to the daemon. I think that is the correct solution for these types of problems.
cc @dnephin
from buildkit.
/cc @endophage
from buildkit.
Seconded on moving (or more likely, duplicating) trust verification on the daemon. It's the desired experience for Ops people. There's probably a shorter term and still useful fix we can make for this though. We're starting work on a docker trust
subcommand for the CLI, I'll add this as a use case and make sure we have a plan for it.
from buildkit.
@endophage @thaJeztah @tonistiigi
Is there a temp workaround here to resolve this problem? If the solution is not finalized yet, I would like to see using the default value of the ARG in Dockerfile when no '--build-arg' provided, like this:
$cat Dockerfile
ARG BASE=alpine:3.6
FROM $BASE AS mirror
...
$docker build --no-cache -t alpine:build .
expected behavior above is the build can run smoothly using the default BASE image: alpine:3.6 without hurting the security
from buildkit.
Related Issues (20)
- testing: test-os windows workflow needs to be split up HOT 3
- sourcepolicy: document the support for wildcards and regexp
- buildctl: consider supporting VScode's dialect of JSON for unmarshalling source policy JSON, etc. (allows comments and trailing commas) HOT 1
- Rootless on Bottlerocker failed with failed to mount /run/user/1000/containerd-mount3852074643: operation not permitted HOT 18
- secret mount: allow dropping `noexec`
- Updating pods requires setting prestop
- concurrent requests may skip loading some cache paths
- Not able to find 0.12.5 version on centos 7 repo HOT 3
- Question: How can I build a multi-arch image distributed
- OTEL: update code to remove use of some deprecated options
- Flaky test: `TestStargzLazyInlineCacheImportExport`
- Build docker HOT 1
- Potential deadlock or goleak in util/progress/progress.go#157 HOT 2
- Inconsistent Marshalling Order in `client/llb` HOT 6
- WCOW/dockerfile fontend: consistency in handling slashes slashes in C:\\ HOT 5
- RUN with chown got "Operation not permitted" error after ADD instruction with tar.gz with usrns-remap enabled HOT 2
- transport: Error while dialing: dial unix /run/user/1000/buildkit/buildkitd.sock: connect: no such file or directory HOT 2
- BuildOpts not available via gRPC like other values HOT 7
- if crun is used, an error occurs when building the image: unrecognized option --keep HOT 2
- Error during build using corporate proxy HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buildkit.