PhpStorm
 
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

Code Inspection: Invalid destination for ''ADD''/''COPY'' commands

Last modified: 13 May 2022

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: