Skip to content

ADD over curl documentation does not cover all cases #22168

Open
@adyanth

Description

@adyanth

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/buildRelates to Dockerfiles or docker build command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions