-
Notifications
You must be signed in to change notification settings - Fork 447
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
Secret mount in RUN command increases build time #2361
Comments
It turns out the secret mount in the RUN command was causing the issue. I refactored that to a COPY + RUN command and saw my build times decrease incredibly and become accurate once again From:
To:
We had been mounting secrets for a couple months now and not seen this issue. We do run a containerized build setup. Perhaps that mount of a file being transferred between our build agent running in a container to our docker-in-docker container is causing this issue |
(See comment for update)
Contributing guidelines
I've found a bug and checked that ...
Description
I have several COPY commands in Dockerfile formatted like this:
COPY --chmod=755 some_dir/ .
Where the docker buildx output states some amount of time to complete said COPY, as expected. BUT, the timestamps reported in my CI/CD pipeline indicate some sort of gap in time between that COPY and the following command that's unaccounted for.
Here's an example:
You can see from the above that the "DONE 16.2" seconds is accurate between the first timestamp and the second. Look at the third timestamp, however. There's a gap there of ~13 minutes. The RUN executed in #28 there completes at:
Which is a fairly accurate time between the fourth timestamp and the above (~13 minutes).
My question is, where does that inconsistency between the second and third timestamp and the above result from? Is there a good way to test that?
Expected behaviour
A COPY that takes x amount of time ought to match up with the timestamp reported logs that are output by the build. If a COPY takes 10 seconds, that should match up with the timestamps showing that 10 second change.
Actual behaviour
The timestamps that my CI/CD pipeline outputs ought to match up with the reported times that Docker buildx build executes commands. The time gap here seems odd, and I'm not sure what the build is doing during that time.
Buildx version
github.com/docker/buildx v0.13.1 7884339
Docker info
No response
Builders list
Configuration
Build logs
No response
Additional info
docker buildx build
inside of a kubernetes containerThe text was updated successfully, but these errors were encountered: