Browse Source

increase size of /dev/shm instead of using /tmp via --disable-dev-shm-usage

Fabian Peter Hammerle 3 years ago
parent
commit
57b69f0e33
3 changed files with 10 additions and 3 deletions
  1. 2 2
      CHANGELOG.md
  2. 1 1
      Dockerfile
  3. 7 0
      docker-compose.yml

+ 2 - 2
CHANGELOG.md

@@ -8,8 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 ### Fixed
 - added `libgl1` to fix some browser crashes
   and to reduce ubiquitous "Aw, Snap!" errors ("Error code: 6")
-- added `--disable-dev-shm-usage` flag to fix some more "Aw, Snap!" errors and video playback
-  (apparently by resolving "ERROR:broker_posix.cc(46)] Received unexpected number of handles")
+- docker-compose: increase size of `/dev/shm` to fix some "Aw, Snap!" errors and video playback
+  ("ERROR:broker_posix.cc(46)] Received unexpected number of handles")
 
 ## [0.1.0] - 2021-02-15
 ### Added

+ 1 - 1
Dockerfile

@@ -35,7 +35,7 @@ VOLUME /home/browser
 # apparently by resolving:
 # > ERROR:broker_posix.cc(46)] Received unexpected number of handles
 # https://github.com/WPO-Foundation/wptagent/issues/327#issuecomment-614086842
-CMD ["brave-browser", "--no-sandbox", "--disable-dev-shm-usage"]
+CMD ["brave-browser", "--no-sandbox"]
 
 # https://github.com/opencontainers/image-spec/blob/v1.0.1/annotations.md
 ARG REVISION=

+ 7 - 0
docker-compose.yml

@@ -30,6 +30,13 @@ services:
         # nosuid,nodev,noexec added by default
         mode: '1777'
         size: 4k
+    # fix some "Aw, Snap!" errors (including video playback)
+    # > ERROR:broker_posix.cc(46)] Received unexpected number of handles
+    # default:
+    # > $ sudo docker exec brave_browser mount | grep /dev/shm
+    # > shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
+    # https://github.com/puppeteer/puppeteer/blob/v7.1.0/docs/troubleshooting.md#tips
+    shm_size: 1GB
     cap_drop: [ALL]
     security_opt: [no-new-privileges]