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

ADD over curl documentation does not cover all cases #22168

Open
1 task done
adyanth opened this issue Mar 6, 2025 · 0 comments · May be fixed by #22169
Open
1 task done

ADD over curl documentation does not cover all cases #22168

adyanth opened this issue Mar 6, 2025 · 0 comments · May be fixed by #22169
Labels
area/build Relates to Dockerfiles or docker build command

Comments

@adyanth
Copy link

adyanth commented Mar 6, 2025

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Information is incorrect

Description

This PR #18582 changed the recommendation from using curl/wget to always using ADD. But it does not fully address the image size and layers increasing, only showing an example to that effect to mitigate it by ADDing to a scratch layer and bind mounting the required remote URL. It does not distinguish between the fact that the ADD runs on the host/buildkit v/s curl which would run in the environment setup by the Dockerfile (important for proxies and such). It does not acknowledge the caching behavior changes, accompanied by how ADD redownloads the file each time to check for changes (which might not be desirable in all situations).

Location

https://docs.docker.com/build/building/best-practices/#add-or-copy

Suggestion

Can send a PR to make the distinction between the ADD recomendation over curl clearer while noting the changes in behavior that result due to the change.

@adyanth adyanth added the status/triage Needs triage label Mar 6, 2025
@adyanth adyanth linked a pull request Mar 6, 2025 that will close this issue
3 tasks
@aevesdocker aevesdocker added area/build Relates to Dockerfiles or docker build command and removed status/triage Needs triage labels Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Relates to Dockerfiles or docker build command
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants