GithubHelp home page GithubHelp logo

Comments (7)

thaJeztah avatar thaJeztah commented on May 21, 2024 3

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.

dciancu avatar dciancu commented on May 21, 2024 2

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.

justincormack avatar justincormack commented on May 21, 2024

cc @tonistiigi

reported in LinuxKit linuxkit/linuxkit#2244

from buildkit.

tonistiigi avatar tonistiigi commented on May 21, 2024

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.

thaJeztah avatar thaJeztah commented on May 21, 2024

/cc @endophage

from buildkit.

endophage avatar endophage commented on May 21, 2024

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.

arm64b avatar arm64b commented on May 21, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.