Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

feat: migrate to a custom karakeep chrome image (#3005)

Mohamed Bassem951e50257ae5
diff --git a/docker/docker-compose.build.yml b/docker/docker-compose.build.yml
index 3fc91d92..073bcafd 100644
--- a/docker/docker-compose.build.yml
+++ b/docker/docker-compose.build.yml
@@ -12,15 +12,15 @@ services:
BROWSER_WEB_URL: http://chrome:9222
DATA_DIR: /data
chrome:
- image: gcr.io/zenika-hub/alpine-chrome:124
+ image: ghcr.io/karakeep-app/karakeep-chrome:release
restart: unless-stopped
+ init: true
command:
- - --no-sandbox
- --disable-gpu
- --disable-dev-shm-usage
- - --remote-debugging-address=0.0.0.0
- - --remote-debugging-port=9222
- --hide-scrollbars
+ - --disable-blink-features=AutomationControlled
+ - --window-size=1440,900
meilisearch:
image: getmeili/meilisearch:v1.41.0
restart: unless-stopped
diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml
index 02e3d44e..3779fc1d 100644
--- a/docker/docker-compose.dev.yml
+++ b/docker/docker-compose.dev.yml
@@ -42,17 +42,17 @@ services:
chrome:
condition: service_started
chrome:
- image: gcr.io/zenika-hub/alpine-chrome:124
+ image: ghcr.io/karakeep-app/karakeep-chrome:release
restart: unless-stopped
+ init: true
ports:
- - 9222:9222
+ - 127.0.0.1:9222:9222
command:
- - --no-sandbox
- --disable-gpu
- --disable-dev-shm-usage
- - --remote-debugging-address=0.0.0.0
- - --remote-debugging-port=9222
- --hide-scrollbars
+ - --disable-blink-features=AutomationControlled
+ - --window-size=1440,900
meilisearch:
image: getmeili/meilisearch:v1.41.0
restart: unless-stopped
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index 0979b223..865bb147 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -20,14 +20,12 @@ services:
# If you want to mount a custom directory, change the volume mapping above instead.
DATA_DIR: /data # DON'T CHANGE THIS
chrome:
- image: gcr.io/zenika-hub/alpine-chrome:124
+ image: ghcr.io/karakeep-app/karakeep-chrome:release
restart: unless-stopped
+ init: true
command:
- - --no-sandbox
- --disable-gpu
- --disable-dev-shm-usage
- - --remote-debugging-address=0.0.0.0
- - --remote-debugging-port=9222
- --hide-scrollbars
- --disable-blink-features=AutomationControlled
- --window-size=1440,900
diff --git a/docs/docs/02-installation/01-docker.md b/docs/docs/02-installation/01-docker.md
index 3858557d..e1c18dd4 100644
--- a/docs/docs/02-installation/01-docker.md
+++ b/docs/docs/02-installation/01-docker.md
@@ -86,4 +86,7 @@ Updating Karakeep will depend on what you used for the `KARAKEEP_VERSION` env va
- If you pinned the app to a specific version, bump the version and re-run `docker compose up -d`. This should pull the new version for you.
- If you used `KARAKEEP_VERSION=release`, you'll need to force docker to pull the latest version by running `docker compose up --pull always -d`.
+If your custom Compose file still uses the old Alpine Chrome image, follow the
+[Chrome image migration guide](../06-administration/09-chrome-image-migration.md).
+
Note that if you want to upgrade/migrate `Meilisearch` versions, refer to the [troubleshooting](../06-administration/05-troubleshooting.md) page.
diff --git a/docs/docs/06-administration/07-legacy-container-upgrade.md b/docs/docs/06-administration/07-legacy-container-upgrade.md
index d95c1c1e..061b3a98 100644
--- a/docs/docs/06-administration/07-legacy-container-upgrade.md
+++ b/docs/docs/06-administration/07-legacy-container-upgrade.md
@@ -36,7 +36,7 @@ index cdfc908..6297563 100644
- volumes:
- - redis:/data
chrome:
- image: gcr.io/zenika-hub/alpine-chrome:123
+ image: ghcr.io/karakeep-app/karakeep-chrome:release
restart: unless-stopped
@@ -37,24 +33,7 @@ services:
MEILI_NO_ANALYTICS: "true"
diff --git a/docs/docs/06-administration/09-chrome-image-migration.md b/docs/docs/06-administration/09-chrome-image-migration.md
new file mode 100644
index 00000000..6ac1d674
--- /dev/null
+++ b/docs/docs/06-administration/09-chrome-image-migration.md
@@ -0,0 +1,49 @@
+# Migrating to the Karakeep Chrome Image
+
+Karakeep now publishes its own tested Chrome image instead of relying on the
+unmaintained Alpine Chrome image. If you maintain a custom Compose file, update
+the `chrome` service with the following diff:
+
+```diff
+ services:
+ chrome:
+- image: gcr.io/zenika-hub/alpine-chrome:124
++ image: ghcr.io/karakeep-app/karakeep-chrome:release
+ restart: unless-stopped
++ init: true
+ command:
+- - --no-sandbox
+ - --disable-gpu
+ - --disable-dev-shm-usage
+- - --remote-debugging-address=0.0.0.0
+- - --remote-debugging-port=9222
+ - --hide-scrollbars
+ - --disable-blink-features=AutomationControlled
+ - --window-size=1440,900
+```
+
+Removing the remote-debugging arguments is required. The new image's entrypoint
+starts Chrome on an internal port and forwards container port `9222`; overriding
+that port conflicts with the forwarding setup. The entrypoint also supplies
+`--no-sandbox`, so removing the duplicate Compose argument does not enable the
+Chromium sandbox.
+
+The connection used by Karakeep does not change:
+
+```yaml
+environment:
+ BROWSER_WEB_URL: http://chrome:9222
+```
+
+After editing the Compose file, pull and recreate the services:
+
+```bash
+docker compose pull chrome
+docker compose up -d chrome
+```
+
+The migration does not change Karakeep data or require a database migration.
+The `release` tag follows the browser image promoted for stable Karakeep
+deployments. To control browser upgrades independently, replace `release` with
+an immutable versioned tag from the
+[Karakeep Chrome package](https://github.com/karakeep-app/karakeep/pkgs/container/karakeep-chrome).
diff --git a/kubernetes/chrome-deployment.yaml b/kubernetes/chrome-deployment.yaml
index 69115cd8..6279c5f3 100644
--- a/kubernetes/chrome-deployment.yaml
+++ b/kubernetes/chrome-deployment.yaml
@@ -14,13 +14,10 @@ spec:
spec:
containers:
- name: chrome
- image: gcr.io/zenika-hub/alpine-chrome:124
- command:
- - chromium-browser
- - --headless
- - --no-sandbox
+ image: ghcr.io/karakeep-app/karakeep-chrome:release
+ args:
- --disable-gpu
- --disable-dev-shm-usage
- - --remote-debugging-address=0.0.0.0
- - --remote-debugging-port=9222
- --hide-scrollbars
+ - --disable-blink-features=AutomationControlled
+ - --window-size=1440,900
diff --git a/packages/benchmarks/docker-compose.yml b/packages/benchmarks/docker-compose.yml
index 4354e19d..6a47ceba 100644
--- a/packages/benchmarks/docker-compose.yml
+++ b/packages/benchmarks/docker-compose.yml
@@ -23,15 +23,15 @@ services:
MEILI_NO_ANALYTICS: "true"
MEILI_MASTER_KEY: dummy
chrome:
- image: gcr.io/zenika-hub/alpine-chrome:124
+ image: ghcr.io/karakeep-app/karakeep-chrome:release
restart: unless-stopped
+ init: true
command:
- - --no-sandbox
- --disable-gpu
- --disable-dev-shm-usage
- - --remote-debugging-address=0.0.0.0
- - --remote-debugging-port=9222
- --hide-scrollbars
+ - --disable-blink-features=AutomationControlled
+ - --window-size=1440,900
nginx:
image: nginx:alpine
restart: unless-stopped
diff --git a/start-dev.sh b/start-dev.sh
index 9741ab00..1265a676 100755
--- a/start-dev.sh
+++ b/start-dev.sh
@@ -33,13 +33,15 @@ fi
# Start Chrome if not already running
if ! port_in_use 9222; then
echo "Starting headless Chrome..."
- docker run -d -p 9222:9222 --name karakeep-chrome gcr.io/zenika-hub/alpine-chrome:124 \
- --no-sandbox \
+ docker run -d --init \
+ -p 127.0.0.1:9222:9222 \
+ --name karakeep-chrome \
+ ghcr.io/karakeep-app/karakeep-chrome:release \
--disable-gpu \
--disable-dev-shm-usage \
- --remote-debugging-address=0.0.0.0 \
- --remote-debugging-port=9222 \
- --hide-scrollbars
+ --hide-scrollbars \
+ --disable-blink-features=AutomationControlled \
+ --window-size=1440,900
else
echo "Chrome is already running on port 9222"
fi
diff --git a/tools/seed-snapshot/docker-compose.yml b/tools/seed-snapshot/docker-compose.yml
index 98697924..64d73d0e 100644
--- a/tools/seed-snapshot/docker-compose.yml
+++ b/tools/seed-snapshot/docker-compose.yml
@@ -24,12 +24,12 @@ services:
MEILI_NO_ANALYTICS: "true"
MEILI_MASTER_KEY: dummy
chrome:
- image: gcr.io/zenika-hub/alpine-chrome:124
+ image: ghcr.io/karakeep-app/karakeep-chrome:release
restart: unless-stopped
+ init: true
command:
- - --no-sandbox
- --disable-gpu
- --disable-dev-shm-usage
- - --remote-debugging-address=0.0.0.0
- - --remote-debugging-port=9222
- --hide-scrollbars
+ - --disable-blink-features=AutomationControlled
+ - --window-size=1440,900