GithubHelp home page GithubHelp logo

Comments (2)

tonistiigi avatar tonistiigi commented on June 1, 2024 2

#4776

from buildkit.

raylu avatar raylu commented on June 1, 2024

I don't think the above fixes it in general. we have a build context with an absolute path (/src.git)
so when we build

$ cat Dockerfile 
FROM alpine

COPY --from=src file /

this still breaks. it used to work in docker 24.0.5:

$ docker buildx version
github.com/docker/buildx v0.11.2 9872040b6626fb7d87ef7296fd5b832e8cc2ad17

but in docker 24.0.9 and 25.0.3,

 $ docker buildx version
github.com/docker/buildx v0.13.1 788433953af10f2a698f5c07611dddce2e08c7a0
~ $ docker buildx build --build-context src=/src.git .
[+] Building 0.2s (4/4) FINISHED                                                                                   docker:default
 => [internal] load local bake definitions                                                                                   0.0s
 => => reading Bakefile 246B / 246B                                                                                          0.0s
 => [internal] load build definition from Dockerfile                                                                         0.0s
 => => transferring dockerfile: 73B                                                                                          0.0s
 => [internal] load .dockerignore                                                                                            0.0s
 => => transferring context: 2B                                                                                              0.0s
 => CANCELED [internal] load metadata for docker.io/library/alpine:latest                                                    0.0s
Dockerfile:3
--------------------
   1 |     FROM alpine
   2 |     
   3 | >>> COPY --from=src file /
   4 |     
--------------------
ERROR: failed to solve: invalid context specifier /src.git for src

the fix in eb41916 only works if the path starts with ./ or ../, which our absolute paths don't

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.