Skip to content

A case to use COPY rather than ADD #12

@junaruga

Description

@junaruga

This related to multiarch/qemu-user-static#66 .

seeing

https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy
Although ADD and COPY are functionally similar, generally speaking, COPY is preferred.
...
For other items (files, directories) that do not require ADD’s tar auto-extraction capability, you should always use COPY.

Maybe this code is the case to change from ADD to COPY.
https://github.com/multiarch/centos/blob/master/update.sh#L103

ADD qemu-${qemu_arch}-static /usr/bin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions