-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add patch for buildkit to fetch by commit #742
Conversation
(rebased, especially for #744) |
Looks like we need to do some testing of moby/buildkit#5441! 👀 |
eb12897
to
612102b
Compare
Rebased for 38eb63e, but now I'm going to update this to be a backport of moby/buildkit#5441 instead 👀 Edit: saving 7274d12...612102b for posterity (the original patch without the rebase noise; "thanks GitHubama") |
ec5ad05
to
abdb80c
Compare
Ok, there's a backport for 0.13, now to rebase on master to pick up the latest releases again 😭 |
abdb80c
to
4c84819
Compare
Yesssssssss!!!! 🎉 $ docker buildx build --builder old --pull 'https://github.com/docker-library/mysql.git#e0d43b2a29867c5b7d5c01a8fea30a086861df2b:8.0' -f Dockerfile.oracle
#0 building with "old" instance using docker-container driver
#1 [internal] load git source https://github.com/docker-library/mysql.git#e0d43b2a29867c5b7d5c01a8fea30a086861df2b:8.0
Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/1/fs/
fatal: Not a valid object name e0d43b2a29867c5b7d5c01a8fea30a086861df2b^{commit}
From https://github.com/docker-library/mysql
* branch e0d43b2a29867c5b7d5c01a8fea30a086861df2b -> FETCH_HEAD
#1 DONE 0.9s
#2 [internal] load metadata for docker.io/library/oraclelinux:8-slim
#2 ...
|
Nice, fallback appears to work fine too: $ docker buildx build --builder old --pull 'https://github.com/docker-library/mysql.git#ffffffffffffffffffffffffffffffffffffffff:8.0' -f Dockerfile.oracle
#0 building with "old" instance using docker-container driver
#1 [internal] load git source https://github.com/docker-library/mysql.git#ffffffffffffffffffffffffffffffffffffffff:8.0
fatal: Not a valid object name ffffffffffffffffffffffffffffffffffffffff^{commit}
fatal: remote error: upload-pack: not our ref ffffffffffffffffffffffffffffffffffffffff
From https://github.com/docker-library/mysql
* [new branch] jq-IN -> origin/jq-IN
* [new branch] master -> origin/master
fatal: reference is not a tree: ffffffffffffffffffffffffffffffffffffffff
#1 ERROR: failed to checkout remote https://github.com/docker-library/mysql.git: git error: exit status 128
stderr:
fatal: reference is not a tree: ffffffffffffffffffffffffffffffffffffffff
------
> [internal] load git source https://github.com/docker-library/mysql.git#ffffffffffffffffffffffffffffffffffffffff:8.0:
fatal: Not a valid object name ffffffffffffffffffffffffffffffffffffffff^{commit}
fatal: remote error: upload-pack: not our ref ffffffffffffffffffffffffffffffffffffffff
From https://github.com/docker-library/mysql
* [new branch] jq-IN -> origin/jq-IN
* [new branch] master -> origin/master
fatal: reference is not a tree: ffffffffffffffffffffffffffffffffffffffff
------
ERROR: failed to solve: failed to read dockerfile: failed to checkout remote https://github.com/docker-library/mysql.git: git error: exit status 128
stderr:
fatal: reference is not a tree: ffffffffffffffffffffffffffffffffffffffff
|
Quick patch to get buildkit to attempt to fetch by digest.Edit by @tianon: this is now simply a backport of moby/buildkit#5441 👀 🥳