DL3010 : Use ADD for extracting archives into an image

Description

ADD automatically extracts local tar archives when the destination is a directory. Using COPY misses this feature.

Goals

Specification

  1. Inspect each COPY instruction.
  2. Skip instructions that include a --from= flag.
  3. Collect the source and destination arguments.
  4. If the destination ends with /, check each source path.
  5. If any source has an archive extension (.tar, .tar.gz, .tgz, .tar.bz2, .tbz, .tar.xz, .txz), emit DL3010 at the instruction line suggesting ADD.

(c) 2025 Asymmetric Effort, LLC. scaldwell@asymmetric-effort.com Asymmetric Effort logo