Skip to content

Conversation

jsternberg
Copy link
Collaborator

Raise the maximum size limit for the dockerfile and correct the size check. The size check was intended to use the size attribute from the file stat, but the original gogo version confused the Size() method (which returned the size of the proto message) with the Size attribute (which was named Size_).

During the conversion, we noticed the mistake but kept the incorrect behavior for the sake of keeping the conversion simple.

This also raises the maximum limit because 512 kB is likely a bit too conservative. The limit has been raised to 2 MB and the limit has been included in the error message.

Raise the maximum size limit for the dockerfile and correct the size
check. The size check was intended to use the size attribute from the
file stat, but the original gogo version confused the `Size()`
method (which returned the size of the proto message) with the `Size`
attribute (which was named `Size_`).

During the conversion, we noticed the mistake but kept the incorrect
behavior for the sake of keeping the conversion simple.

This also raises the maximum limit because 512 kB is likely a bit too
conservative. The limit has been raised to 2 MB and the limit has been
included in the error message.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
@jsternberg jsternberg force-pushed the dockerfile-size-limit branch from c8b8ad2 to d7de22c Compare October 3, 2024 17:12
@tonistiigi tonistiigi merged commit 4815316 into docker:master Oct 3, 2024
106 checks passed
@jsternberg jsternberg deleted the dockerfile-size-limit branch October 3, 2024 21:40
jsternberg added a commit to jsternberg/buildx that referenced this pull request Oct 4, 2024
Similar to docker#2716.

Use the file size rather than the proto size, raise the allowed limit to
the same value for consistency, and improve the error message to include
the limit in human units.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants