Minimal Docker container to run Jasmine tests with Karma runner using PhantomJS/Chrome
- Docker is installed
- Change directory to your project's root where source and test code (with Karma config) live
- Spin up Karma server
docker run -d -p 9876:9876 -v $PWD:/src -w /src --name karma-server yamaszone/jasmine-karma:latest start
- Access Karma server from browser visiting http://<HOST_IP>:9876
- Use Karma runner
docker exec karma-server karma run
# run testsdocker exec karma-server karma --help
# see Karma help