Closed fragkakis closed 1 year ago
I don't think this is related to the action but your Dockerfile. I can move this to the buildx repo as a discussion if this is something you don't repro locally.
OK, I started a discussion for now, and will create a spinoff issue there if I don't figure this out. Thanks!
Behaviour
I have a multistage docker build with 2 images: a
builder
image and aproduction
image. Thebuilder
image contains additional things that I don't need in production. I am only using it to do some groundwork and copy the results to the production image. Pretty much the default scenario builder images are used for. My dockerfile is functional, it is being used in production for years. I am migrating its building to Github Actions.I am seeing that the
production
image step that copies things from thebuilder
image is being executed while thebuilder
image is still being built. Notice below the first line vs the last two lines.Steps to reproduce this issue
build-push-action
Expected behaviour
I would expect that the builder image is built first, and only then would the steps from the production image using it should appear.
Actual behaviour
I am seeing that the
production
image step that copies things from thebuilder
image is being executed while thebuilder
image is still being built.Configuration
Logs
Unfortunately I can't share the logs as they may contain sensitive information. If the snippet from the logs I pasted above is not enough, I will try to redact it and attach it.