-
Notifications
You must be signed in to change notification settings - Fork 559
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
Local-only built image cannot be used as base for another Dockerfile #738
Comments
Thanks for the report! 🎉 This looks like a duplicate of moby/buildkit#2343. There are a couple of workarounds:
|
Thanks for the quick follow-up! |
I think you should just be able to remove the setup-buildx-action if that's the route you want to try. I've also added a note about pushing to an intermediate local registry in the above comment, as another alternative you could consider. I'm gonna close this for now, we have quite a few similar issues, e.g. see docker/buildx#1453. |
Hey @jedevc - nice to spot another UoB'er! I see that moby/buildkit#2827 has been merged & v0.11 released. My knowledge of buildkit is lacking however, I can see that I can get an OCI output from this action using:
And that I can potentially feed an OCI back in as a build-context:
Where I assume Is there an end-to-end working solution here? Or am I trying to piece together things before they're ready? |
Heya @MGough! 👋 👋 A full use of the manual buildx commands might look like (which map easily into the action):
where The |
Thanks that clears it up, I hadn't spotted any mention of that I've gone for the workaround:
for now as the specific image I'm building isn't particularly complex so it'll survive like this for now until I get a chance to bring it back in line with our other images. |
Troubleshooting
Before submitting a bug report please read the Troubleshooting doc.
Yes.
Behaviour
Steps to reproduce this issue
set the 'images' arg to an unknown, locally-valid-only image
Expected behaviour
Actual behaviour
Configuration
Logs
Can only provide this part (notice the image.name property):
I tried without specifying 'dslocal/' prefix, but read that if I don't specify it, docker appends 'docker.io/' so I was trying to avoid that. But it seems this action doesn't work that way.
I only want this image to be local
docker ps
shows the correct names:Manually running
docker build -t toberemoved:latest .
works fine when using it on the 2nd DockerfileI might look in the wrong place, as the 'docker.io/' added in the medatada action might not cause this at all (might just be ignored), but while I try to use this image as the base of another image that I want to push to a registry, it fails with (notice the image name is correct):
The Dockerfile of the 2nd image starts with
where
DBD_BUILDER_COMMIT_IMAGE_TAG == buildersha-3a32687d386fa435e0b4603463ad58c80e81a61b
The reason I'm creating the dotnetbase image is that multiple images depend on it, but no other solution could be useful in my case (docker multi stage builds, for example, seems pretty complicated while also limited for what I want to do)
The text was updated successfully, but these errors were encountered: