Dockerfile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. FROM docker.io/debian:10.8-slim
  2. # manually installing libgl1 to fix some browser crashes
  3. # and to reduce ubiquitous "Aw, Snap!" errors ("Error code: 6"):
  4. # > [[...]:angle_platform_impl.cc(43)] Display.cpp:833 (initialize): ANGLE Display::initialize error 12289: Could not dlopen libGL.so.1: [...]
  5. # > [[...]:gl_surface_egl.cc(773)] EGL Driver message (Critical) eglInitialize: Could not dlopen libGL.so.1: [...]
  6. # > [[...]:gl_surface_egl.cc(1322)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
  7. # > [[...]:gl_initializer_linux_x11.cc(160)] GLSurfaceEGL::InitializeOneOff failed.
  8. # > [[...]:viz_main_impl.cc(150)] Exiting GPU process due to errors during initialization
  9. # https://brave.com/linux/#release-channel-installation
  10. RUN apt-get update \
  11. && apt-get install --yes --no-install-recommends \
  12. ca-certificates \
  13. gnupg \
  14. libgl1 \
  15. && apt-key adv --keyserver pool.sks-keyservers.net \
  16. --recv-keys D8BAD4DE7EE17AF52A834B2D0BB75829C2D4E821 \
  17. && rm -rf /var/lib/apt/lists/* \
  18. && echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" \
  19. > /etc/apt/sources.list.d/brave-browser-release.list \
  20. && useradd --create-home browser
  21. ARG BRAVE_BROWSER_PACKAGE_VERSION=1.20.103
  22. RUN apt-get update \
  23. && apt-get install --yes --no-install-recommends \
  24. brave-browser=$BRAVE_BROWSER_PACKAGE_VERSION \
  25. && rm -rf /var/lib/apt/lists/* \
  26. && find / -xdev -type f -perm /u+s -exec chmod -c u-s {} \; \
  27. && find / -xdev -type f -perm /g+s -exec chmod -c g-s {} \;
  28. USER browser
  29. VOLUME /home/browser
  30. #CMD ["brave-browser"] podman
  31. CMD ["brave-browser", "--no-sandbox"]
  32. # https://github.com/opencontainers/image-spec/blob/v1.0.1/annotations.md
  33. ARG REVISION=
  34. LABEL org.opencontainers.image.title="brave browser" \
  35. org.opencontainers.image.source="https://github.com/fphammerle/docker-brave-browser" \
  36. org.opencontainers.image.revision="$REVISION"