From 014c1e1dc7d01b6a8f53399dc650bd60e9e62ff5 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Thu, 11 Jan 2024 19:02:34 -0800 Subject: [PATCH] remove dbus from docker setup, not actually needed --- Dockerfile | 9 ++++----- bin/docker_entrypoint.sh | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index edf9279d..454effe8 100644 --- a/Dockerfile +++ b/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..." \ && apt-get update -qq \ && 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 \ - && 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 \ # install Chromium using 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 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: # CHROME_SANDBOX=False \ # WGET_BINARY="wget" \ diff --git a/bin/docker_entrypoint.sh b/bin/docker_entrypoint.sh index 7e7a99c3..03e8e483 100755 --- a/bin/docker_entrypoint.sh +++ b/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 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)"