创builddocker文件来运行基于selenium Javascript的testing

我正在尝试创build一个docker文件来运行基于java脚本的项目的seleniumtesting。 下面是我的docker文件到目前为止:

#base image FROM selenium/standalone-chrome #access to the project within docker container - Bundle app source COPY ./seleniumTest/project /app # 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 - #binding EXPOSE 8080 #Define runtime ENTRYPOINT /app/login.test.js 

同时构build并运行$ docker run -p 4000:8080 dockertest2镜像: $ docker run -p 4000:8080 dockertest2返回/bin/sh: 1: /app/login.test.js: Permission denied

为什么被拒绝的权限呢? PS:我改变了包含Dockerfile和自动化testingJS文件的cd dircd dir )。

创build一个Docker容器,其中包含您运行所需的所有依赖关系。可以在DockerFile中指定。

在入口处附加一个脚本以启动Selenium Server Standalone。

build立和运行您的容器,并记住绑定和公开您的selenium运行的端口

    Interesting Posts