Browse Source

remove dbus from docker setup, not actually needed

Nick Sweeting 1 year ago
parent
commit
014c1e1dc7
2 changed files with 8 additions and 5 deletions
  1. 4 5
      Dockerfile
  2. 4 0
      bin/docker_entrypoint.sh

+ 4 - 5
Dockerfile

@@ -183,9 +183,10 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-$TARGETARCH$T
     echo "[+] Installing Browser binary dependencies to $PLAYWRIGHT_BROWSERS_PATH..." \
     echo "[+] Installing Browser binary dependencies to $PLAYWRIGHT_BROWSERS_PATH..." \
     && apt-get update -qq \
     && apt-get update -qq \
     && apt-get install -qq -y -t bookworm-backports --no-install-recommends \
     && apt-get install -qq -y -t bookworm-backports --no-install-recommends \
-        libxss1 dbus dbus-x11 \
         fontconfig fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-symbola fonts-noto fonts-freefont-ttf \
         fontconfig fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-symbola fonts-noto fonts-freefont-ttf \
-    && service dbus start \
+        # chrome can run without dbus/upower technically, it complains about missing dbus but should run ok anyway
+        # libxss1 dbus dbus-x11 upower \
+    # && service dbus start \
     && if [[ "$TARGETPLATFORM" == *amd64* || "$TARGETPLATFORM" == *arm64* ]]; then \
     && if [[ "$TARGETPLATFORM" == *amd64* || "$TARGETPLATFORM" == *arm64* ]]; then \
         # install Chromium using playwright
         # install Chromium using playwright
         pip install playwright \
         pip install playwright \
@@ -265,9 +266,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-$TARGETARCH$T
 
 
 # Setup ArchiveBox runtime config
 # Setup ArchiveBox runtime config
 WORKDIR "$DATA_DIR"
 WORKDIR "$DATA_DIR"
-ENV IN_DOCKER=True \
-    DBUS_SESSION_BUS_ADDRESS=autolaunch:
-    # needed to fix chrome headless dbus erros ^
+ENV IN_DOCKER=True
     ## No need to set explicitly, these values will be autodetected by archivebox in docker:
     ## No need to set explicitly, these values will be autodetected by archivebox in docker:
     # CHROME_SANDBOX=False \
     # CHROME_SANDBOX=False \
     # WGET_BINARY="wget" \
     # WGET_BINARY="wget" \

+ 4 - 0
bin/docker_entrypoint.sh

@@ -140,6 +140,10 @@ elif [[ "$DATA_USED_PCT" -ge 99 ]] || [[ "$ROOT_AVAIL_KB" -lt 500000 ]]; then
     df -kh /data > /dev/stderr
     df -kh /data > /dev/stderr
 fi
 fi
 
 
+# set DBUS_SYSTEM_BUS_ADDRESS & DBUS_SESSION_BUS_ADDRESS (dbus is not technically needed, it just makes chrome log fewer warnings)
+# service dbus start >/dev/null 2>&1 &
+# export $(dbus-launch --close-stderr)
+
 
 
 export ARCHIVEBOX_BIN_PATH="$(which archivebox)"
 export ARCHIVEBOX_BIN_PATH="$(which archivebox)"