Inspectopedia
 
2024.3

Invalid destination for ''ADD''/''COPY'' commands

Warning
New
Last modified: 03 December 2024

Reports invalid destination directories in ADD and COPY commands.

According to the Dockerfile specification, if multiple sources are specified, then the destination must be a directory, and it must end with a slash '/'. Otherwise, Docker build will fail.

Examples:

After the quick-fix is applied: