edp963 / davinci-docker

Davinci Docker Deployment
Apache License 2.0
154 stars 99 forks source link

使用“local.Dockerfile”本地构建Docker镜像失败,提示“chmod: /opt/phantomjs-2.1.1/phantomjs: Not a directory”! #18

Open zhangyibin1991 opened 4 years ago

zhangyibin1991 commented 4 years ago

local.Dokcerfile文件中的命令ADD phantomjs /opt/phantomjs-2.1.1会以/opt/phantomjs-2.1.1作为文件名将phantomjs添加到镜像中,所以构建过程中会提示chmod: /opt/phantomjs-2.1.1/phantomjs: Not a directory错误,因为在目录/opt/phantomjs-2.1.1中并不存在文件phantomjs

添加文件分隔符/后可以跑通。 ADD phantomjs /opt/phantomjs-2.1.1 => ADD phantomjs /opt/phantomjs-2.1.1/

mulanshandi commented 4 years ago

部署不起来。我修改成如下才可以: ARG PHANTOMJS_BZ2=phantomjs-2.1.1-linux-x86_64.tar.bz2

RUN mkdir -p /opt/phantomjs-2.1.1/phantomjs

ADD $PHANTOMJS_BZ2 /opt/phantomjs-2.1.1/phantomjs