Skip to content

Commit 951e502

Browse files
feat: migrate to a custom karakeep chrome image (#3005)
1 parent b6415b3 commit 951e502

10 files changed

Lines changed: 83 additions & 34 deletions

File tree

‎docker/docker-compose.build.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ services:
1212
BROWSER_WEB_URL: http://chrome:9222
1313
DATA_DIR: /data
1414
chrome:
15-
image: gcr.io/zenika-hub/alpine-chrome:124
15+
image: ghcr.io/karakeep-app/karakeep-chrome:release
1616
restart: unless-stopped
17+
init: true
1718
command:
18-
- --no-sandbox
1919
- --disable-gpu
2020
- --disable-dev-shm-usage
21-
- --remote-debugging-address=0.0.0.0
22-
- --remote-debugging-port=9222
2321
- --hide-scrollbars
22+
- --disable-blink-features=AutomationControlled
23+
- --window-size=1440,900
2424
meilisearch:
2525
image: getmeili/meilisearch:v1.41.0
2626
restart: unless-stopped

‎docker/docker-compose.dev.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ services:
4242
chrome:
4343
condition: service_started
4444
chrome:
45-
image: gcr.io/zenika-hub/alpine-chrome:124
45+
image: ghcr.io/karakeep-app/karakeep-chrome:release
4646
restart: unless-stopped
47+
init: true
4748
ports:
48-
- 9222:9222
49+
- 127.0.0.1:9222:9222
4950
command:
50-
- --no-sandbox
5151
- --disable-gpu
5252
- --disable-dev-shm-usage
53-
- --remote-debugging-address=0.0.0.0
54-
- --remote-debugging-port=9222
5553
- --hide-scrollbars
54+
- --disable-blink-features=AutomationControlled
55+
- --window-size=1440,900
5656
meilisearch:
5757
image: getmeili/meilisearch:v1.41.0
5858
restart: unless-stopped

‎docker/docker-compose.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ services:
2020
# If you want to mount a custom directory, change the volume mapping above instead.
2121
DATA_DIR: /data # DON'T CHANGE THIS
2222
chrome:
23-
image: gcr.io/zenika-hub/alpine-chrome:124
23+
image: ghcr.io/karakeep-app/karakeep-chrome:release
2424
restart: unless-stopped
25+
init: true
2526
command:
26-
- --no-sandbox
2727
- --disable-gpu
2828
- --disable-dev-shm-usage
29-
- --remote-debugging-address=0.0.0.0
30-
- --remote-debugging-port=9222
3129
- --hide-scrollbars
3230
- --disable-blink-features=AutomationControlled
3331
- --window-size=1440,900

‎docs/docs/02-installation/01-docker.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,7 @@ Updating Karakeep will depend on what you used for the `KARAKEEP_VERSION` env va
8686
- 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.
8787
- 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`.
8888

89+
If your custom Compose file still uses the old Alpine Chrome image, follow the
90+
[Chrome image migration guide](../06-administration/09-chrome-image-migration.md).
91+
8992
Note that if you want to upgrade/migrate `Meilisearch` versions, refer to the [troubleshooting](../06-administration/05-troubleshooting.md) page.

‎docs/docs/06-administration/07-legacy-container-upgrade.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ index cdfc908..6297563 100644
3636
- volumes:
3737
- - redis:/data
3838
chrome:
39-
image: gcr.io/zenika-hub/alpine-chrome:123
39+
image: ghcr.io/karakeep-app/karakeep-chrome:release
4040
restart: unless-stopped
4141
@@ -37,24 +33,7 @@ services:
4242
MEILI_NO_ANALYTICS: "true"
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Migrating to the Karakeep Chrome Image
2+
3+
Karakeep now publishes its own tested Chrome image instead of relying on the
4+
unmaintained Alpine Chrome image. If you maintain a custom Compose file, update
5+
the `chrome` service with the following diff:
6+
7+
```diff
8+
services:
9+
chrome:
10+
- image: gcr.io/zenika-hub/alpine-chrome:124
11+
+ image: ghcr.io/karakeep-app/karakeep-chrome:release
12+
restart: unless-stopped
13+
+ init: true
14+
command:
15+
- - --no-sandbox
16+
- --disable-gpu
17+
- --disable-dev-shm-usage
18+
- - --remote-debugging-address=0.0.0.0
19+
- - --remote-debugging-port=9222
20+
- --hide-scrollbars
21+
- --disable-blink-features=AutomationControlled
22+
- --window-size=1440,900
23+
```
24+
25+
Removing the remote-debugging arguments is required. The new image's entrypoint
26+
starts Chrome on an internal port and forwards container port `9222`; overriding
27+
that port conflicts with the forwarding setup. The entrypoint also supplies
28+
`--no-sandbox`, so removing the duplicate Compose argument does not enable the
29+
Chromium sandbox.
30+
31+
The connection used by Karakeep does not change:
32+
33+
```yaml
34+
environment:
35+
BROWSER_WEB_URL: http://chrome:9222
36+
```
37+
38+
After editing the Compose file, pull and recreate the services:
39+
40+
```bash
41+
docker compose pull chrome
42+
docker compose up -d chrome
43+
```
44+
45+
The migration does not change Karakeep data or require a database migration.
46+
The `release` tag follows the browser image promoted for stable Karakeep
47+
deployments. To control browser upgrades independently, replace `release` with
48+
an immutable versioned tag from the
49+
[Karakeep Chrome package](https://github.com/karakeep-app/karakeep/pkgs/container/karakeep-chrome).

‎kubernetes/chrome-deployment.yaml‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,10 @@ spec:
1414
spec:
1515
containers:
1616
- name: chrome
17-
image: gcr.io/zenika-hub/alpine-chrome:124
18-
command:
19-
- chromium-browser
20-
- --headless
21-
- --no-sandbox
17+
image: ghcr.io/karakeep-app/karakeep-chrome:release
18+
args:
2219
- --disable-gpu
2320
- --disable-dev-shm-usage
24-
- --remote-debugging-address=0.0.0.0
25-
- --remote-debugging-port=9222
2621
- --hide-scrollbars
22+
- --disable-blink-features=AutomationControlled
23+
- --window-size=1440,900

‎packages/benchmarks/docker-compose.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ services:
2323
MEILI_NO_ANALYTICS: "true"
2424
MEILI_MASTER_KEY: dummy
2525
chrome:
26-
image: gcr.io/zenika-hub/alpine-chrome:124
26+
image: ghcr.io/karakeep-app/karakeep-chrome:release
2727
restart: unless-stopped
28+
init: true
2829
command:
29-
- --no-sandbox
3030
- --disable-gpu
3131
- --disable-dev-shm-usage
32-
- --remote-debugging-address=0.0.0.0
33-
- --remote-debugging-port=9222
3432
- --hide-scrollbars
33+
- --disable-blink-features=AutomationControlled
34+
- --window-size=1440,900
3535
nginx:
3636
image: nginx:alpine
3737
restart: unless-stopped

‎start-dev.sh‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ fi
3333
# Start Chrome if not already running
3434
if ! port_in_use 9222; then
3535
echo "Starting headless Chrome..."
36-
docker run -d -p 9222:9222 --name karakeep-chrome gcr.io/zenika-hub/alpine-chrome:124 \
37-
--no-sandbox \
36+
docker run -d --init \
37+
-p 127.0.0.1:9222:9222 \
38+
--name karakeep-chrome \
39+
ghcr.io/karakeep-app/karakeep-chrome:release \
3840
--disable-gpu \
3941
--disable-dev-shm-usage \
40-
--remote-debugging-address=0.0.0.0 \
41-
--remote-debugging-port=9222 \
42-
--hide-scrollbars
42+
--hide-scrollbars \
43+
--disable-blink-features=AutomationControlled \
44+
--window-size=1440,900
4345
else
4446
echo "Chrome is already running on port 9222"
4547
fi

‎tools/seed-snapshot/docker-compose.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ services:
2424
MEILI_NO_ANALYTICS: "true"
2525
MEILI_MASTER_KEY: dummy
2626
chrome:
27-
image: gcr.io/zenika-hub/alpine-chrome:124
27+
image: ghcr.io/karakeep-app/karakeep-chrome:release
2828
restart: unless-stopped
29+
init: true
2930
command:
30-
- --no-sandbox
3131
- --disable-gpu
3232
- --disable-dev-shm-usage
33-
- --remote-debugging-address=0.0.0.0
34-
- --remote-debugging-port=9222
3533
- --hide-scrollbars
34+
- --disable-blink-features=AutomationControlled
35+
- --window-size=1440,900

0 commit comments

Comments
 (0)