Skip to content

Commit 698b3aa

Browse files
committed
Added tips for linux docker
1 parent b5bac9c commit 698b3aa

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,29 @@ The browser can also be specified with `npm test` commmand like below:
7171
"coverage": "ng t --no-watch --code-coverage --reporters=junit,coverage-istanbul --browsers=EdgeHeadless --progress=false"
7272
```
7373

74+
## Running from Linux Docker
75+
76+
For running in docker, you may get error like below:
77+
78+
"Edge Headless stderr: [0116/032919.925976:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180."
79+
80+
Then you need to run it as non-root user or disable sandbox. Please read [sandbox design](https://chromium.googlesource.com/chromium/src/+/master/docs/design/sandbox.md) before disabling it.
81+
82+
This can be done using custom launcher in `karma.conf.js` using Edge launcher as base and adding extra flags as desired.
83+
84+
For example, for angular app, add below in `karma.conf.js`:
85+
86+
```js
87+
customLaunchers: {
88+
EdgeHeadlessCI: {
89+
base: "EdgeHeadless",
90+
flags: ["--no-sandbox"],
91+
},
92+
},
93+
```
94+
95+
and in `package.json` use it like: `"test:edge": "ng test --no-watch --browsers=EdgeHeadlessCI"`
96+
7497
## Build from Source
7598

7699
In case if you want to build package from github source

0 commit comments

Comments
 (0)