ADD over curl
documentation does not cover all cases
#22168
Labels
area/build
Relates to Dockerfiles or docker build command
Is this a docs issue?
Type of issue
Information is incorrect
Description
This PR #18582 changed the recommendation from using
curl
/wget
to always usingADD
. But it does not fully address the image size and layers increasing, only showing an example to that effect to mitigate it byADD
ing to a scratch layer and bind mounting the required remote URL. It does not distinguish between the fact that theADD
runs on the host/buildkit v/scurl
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 howADD
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 overcurl
clearer while noting the changes in behavior that result due to the change.The text was updated successfully, but these errors were encountered: