报错信息:
error building image: error building stage: failed to optimize
instructions: failed to get files used from context: when specifying
multiple sources in a COPY command, destination must be a directory
and end in ‘/’
在做gitlab-ci自动化部署的时候,Pipelines执行的时候报了如上的错。我的一个小需求是将一个外部jar包移动到docker容器里面并重命名。下面是当时我写的Dockerfile的一个命令
报错原因:因为*匹配了不止一个jar包,当时没注意我这个目录下有两个jar包
解决:目标文件改成目录的形式,或者只保证有一个jar包