running Xvfb without tcp/socket listen and access control disabled
since it's local only to avoid seeing an error message related to socket
explicit copy of package/lock to leverage docker caching / avoid
module reinstall in case only app code changed
point NODE_PATH to where the modules are so that you can run the docker
with arbitrary test location like this:
docker run -it -v $(PWD)/tests:/mytests e2e:latest /mytests/**/*.js
Testing
1) Dockerfile builds
2) This passing: docker run -it e2e:latest
3) This passing: docker run -it -v $(PWD)/tests:/mytests e2e:latest /mytests/**/*.js
Why Needed the following:
Optimizations:
docker run -it -v $(PWD)/tests:/mytests e2e:latest /mytests/**/*.js
Testing 1) Dockerfile builds 2) This passing:
docker run -it e2e:latest
3) This passing:docker run -it -v $(PWD)/tests:/mytests e2e:latest /mytests/**/*.js