我想将一个shell脚本添加到容器中,并在构建过程中运行它。
下面是dockerfile的相关部分:
#phantomjs install
COPY conf/phantomjs.sh ~/phantomjs.sh
RUN chmod +x ~/phantomjs.sh && ~/phantomjs.sh
以下是构建过程中的输出:
Step 16 : COPY conf/phantomjs.sh ~/phantomjs.sh
---> Using cache
---> 8199d97eb936
Step 17 : RUN chmod +x ~/phantomjs.sh && ~/phantomjs.sh
---> Running in 3c7ecb307bd3
[91mchmod: [0m[91mcannot access '/root/phantomjs.sh'[0m[91m: No such file or directory[0m[91m
我正在复制的文件存在于build目录下的conf文件夹中......但无论我怎么做,它似乎都没有被复制过去。