Skip to content

Commit

Permalink
Add no-sandbox arg to browser enabled Docker image
Browse files Browse the repository at this point in the history
In order to allow chrome to execute in the browser enabled image, either
SYS_ADMIN Docker capability or no-sandbox browser argument had to be
set. This commit sets the 'no-sandbox' option in the Dockerfile
definition itself so this action is no longer necessary to run the
Docker container. This is arguably also the better option, as we are
running the chrome browser inside a container, versus using the Docker
capability.
  • Loading branch information
ka3de committed Sep 19, 2023
1 parent 81005d8 commit 55eba3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@ ENV CHROME_BIN=/usr/bin/chromium-browser
ENV CHROME_PATH=/usr/lib/chromium/

ENV K6_BROWSER_HEADLESS=true
# no-sandbox chrome arg is required to run chrome browser in
# alpine and avoids the usage of SYS_ADMIN Docker capability
ENV K6_BROWSER_ARGS=no-sandbox

ENTRYPOINT ["k6"]

0 comments on commit 55eba3a

Please sign in to comment.