简体   繁体   English

运行Docker映像失败

[英]running a docker image fails

I am expecting to run the docker image successfully however not able to have access and getting permission denied error as below. 我期望成功运行docker映像,但是无法访问并获得权限被拒绝的错误,如下所示。

#base image
FROM selenium/standalone-chrome

# Install Node.js
RUN sudo apt-get update
RUN sudo apt-get install --yes curl
RUN curl --silent --location https://deb.nodesource.com/setup_8.x | sudo bash 

#Define runtime  
ENTRYPOINT /app/login.test.js

why is the permission denied for it? 为什么会拒绝此权限? PS: I have changed to the dir which contains both Dockerfile and automation test JS files using ( cd dir ). PS:我已更改为使用( cd dir )包含Dockerfile和自动化测试JS文件的cd dir

Your .js file is not an executable in itself, which is why you get permission denied. 您的.js文件本身不是可执行文件,这就是为什么权限被拒绝的原因。

Try running it through JavaScript: 尝试通过JavaScript运行它:

ENTRYPOINT node /app/login.test.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM