Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zhangyibin1991 opened this issue May 14, 2020 · 1 comment

Comments

@zhangyibin1991
Copy link

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
Copy link

部署不起来。我修改成如下才可以:
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants