Skip to content
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

build: raise maximum size limit for dockerfile and fix size check #2716

Merged
merged 1 commit into from
Oct 3, 2024

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.

build/url.go Outdated Show resolved Hide resolved
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>
@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.

3 participants