GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — inconsistent bake files merge order · Issue #2236 · docker/buildx

inconsistent bake files merge order #2236

New issue
Copy link
New issue
Copy link
Closed
#2237
Closed
inconsistent bake files merge order#2236
#2237
Copy link
Labels
area/bakekind/bugSomething isn't working
Milestone
v0.12.2

Description

@crazy-max
crazy-max
opened on Feb 1, 2024
Issue body actions

follow-up:

  • bake: set cwd:// prefix for bake files path metadata-action#370 (comment)
  • v5.5.0 Broke docker/bake-action with docker-metadata-action metadata-action#380

When using cwd:// prefix to load local files, the order when merging definitions is inconsistent.

Repro:

# docker-bake.hcl
target "default" {
	dockerfile-inline = <<EOT
FROM scratch
COPY foo /foo
EOT
}
# docker-bake-cwd.hcl
target "default" {
	dockerfile-inline = <<EOT
FROM scratch
COPY bar /bar
EOT
}
$ touch bar
$ docker buildx bake -f docker-bake.hcl -f cwd://docker-bake-cwd.hcl
#0 building with "integration-remote-50k0za15d0dzwgux4ky9yhd1e" instance using remote driver
        	            	
#1 [internal] load local bake definitions
#1 reading docker-bake-cwd.hcl 80B / 80B done
#1 reading docker-bake.hcl 80B / 80B done
#1 DONE 0.0s

#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 64B done
#2 DONE 0.0s

#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [internal] load build context
#4 transferring context: 2B done
#4 DONE 0.0s

#5 [1/1] COPY foo /foo
#5 ERROR: failed to calculate checksum of ref yckkdgn9arucath7i0lceuonf::4f9gaja38fx3nykbaexosznxj: "/foo": not found
------
 > [1/1] COPY foo /foo:
------
Dockerfile:2
--------------------
   1 |     FROM scratch
   2 | >>> COPY foo /foo
   3 |     
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref yckkdgn9arucath7i0lceuonf::4f9gaja38fx3nykbaexosznxj: "/foo": not found

In the logs we can see it loads first docker-bake-cwd.hcl but should be docker-bake.hcl.

Seems related to #1838

Activity

  1. crazy-max
    added
    kind/bugSomething isn't working
    area/bake
    on Feb 1, 2024
  2. crazy-max
    added this to the v0.12.2 milestone on Feb 1, 2024
  3. crazy-max
    closed this as completedin #2237on Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/bakekind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      • v0.12.2

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.