Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Enable Chromium to run on devcontainer
Browse files Browse the repository at this point in the history
The Chromium browser has to run in headless mode when we are running in
a devcontainer (e.g. GitHub Codespaces).

Also, we need to run the container without [seccomp][1] restrictions,
otherwise we receive an error when running the specifications, saying
that there is no usable sandbox for Chromium to run in.

It would be nice if we could use a [custom seccomp profile][2], rather
than removing all seccomp restrictions entirely, but it appears that
Codespaces doesn't currently allow custom seccomp profiles. Certainly
the [docs for the (now-obsolete) Visual Studio Codespaces say that][3].

[1]: https://docs.docker.com/engine/security/seccomp/
[2]: jlund/docker-chrome-pulseaudio#8 (comment)
[3]: https://docs.microsoft.com/en-us/visualstudio/codespaces/reference/configuring#docker-properties
  • Loading branch information
johnboyes authored Nov 29, 2020
1 parent cffacb9 commit e3a05f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"args": { "VARIANT": "14" }
},

"runArgs": ["--security-opt", "seccomp=unconfined" ],

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
Expand Down
2 changes: 1 addition & 1 deletion env/default/headless.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# headless.properties

# Change this to true to run test in headless mode in chrome
headless_chrome = false
headless_chrome = true

0 comments on commit e3a05f5

Please sign in to comment.