Skip to content

A spy satellite simulator in your browser, except the data is real. Live open source spatial intelligence on a photorealistic 3D globe.

fix(docker): let SELinux hosts read the bind-mounted checkout (#1391)

Anıl Güvenç2a17491c8bd5
diff --git a/README.md b/README.md
index 80f052571..ca90bf2c0 100644
--- a/README.md
+++ b/README.md
@@ -207,6 +207,8 @@ env UID=1026 GID=100 docker compose up -d
Keep the `env`: bash treats `UID` as read-only, so a plain `UID=1026` in front of a command is silently ignored. If the container can't write the checkout, it says so at start. Docker Desktop on macOS and Windows maps ownership for you.
+On SELinux hosts (Fedora, RHEL), compose mounts the checkout with `:z` so the container may read it; Docker may relabel the checkout for container access, which can take a moment on a large checkout. Without that, the start fails with `Cannot find module '/app/scripts/docker-start.mjs'`.
+
Behind a reverse proxy, put your keys in `.env` or pass them as environment variables - Provider Settings refuses proxied requests on purpose - and add the hostname you serve it on, for example `GEV_ALLOWED_HOSTS=globe.example.lan` (see [Sharing an instance](#-sharing-an-instance)).
</details>
diff --git a/changelog.d/1391-docker-selinux.md b/changelog.d/1391-docker-selinux.md
new file mode 100644
index 000000000..186147a2e
--- /dev/null
+++ b/changelog.d/1391-docker-selinux.md
@@ -0,0 +1,4 @@
+- Start the Docker install on SELinux hosts such as Fedora and RHEL. Compose now
+ mounts the checkout with `:z`; without it the container could not read `/app`
+ and stopped with "Cannot find module '/app/scripts/docker-start.mjs'"
+ (Anıl Güvenç, @anilguvenc, #1391).
diff --git a/compose.yaml b/compose.yaml
index c2d3bf3d4..38cf438ca 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -22,5 +22,8 @@ services:
# UI land in the .env on your host instead of vanishing with the
# container. node_modules stays in the image: sharp and friends are
# compiled for Linux and must not be shadowed by a host install.
- - .:/app
+ # `:z` relabels the checkout for containers on SELinux hosts (Fedora,
+ # RHEL); without it the container cannot read /app at all and Node
+ # reports the launcher as "Cannot find module". Elsewhere it is ignored.
+ - .:/app:z
- /app/node_modules
diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md
index 63d523c28..98214e541 100644
--- a/docs/CURRENT-STATE.md
+++ b/docs/CURRENT-STATE.md
@@ -1,5 +1,9 @@
# God's Eye View Current State
+Docker Compose mounts the checkout with the shared SELinux `:z` label so
+containers can read it on enforcing SELinux hosts. The separate image-owned
+`node_modules` volume and loopback-only port publishing remain unchanged.
+
Aircraft detection candidates reuse normalized display text until callsign or
registration changes, including in-place enrichment. Each candidate resolves its
fleet model once per collection. Positions, model ownership and tracked-aircraft
diff --git a/src/dockerLauncher.test.mjs b/src/dockerLauncher.test.mjs
index 213fe59dc..4e97849c0 100644
--- a/src/dockerLauncher.test.mjs
+++ b/src/dockerLauncher.test.mjs
@@ -75,4 +75,5 @@ test('the Docker install path keeps its loopback-only, launcher-owned contract',
assert.match(compose, /^\s+- GEV_KEY_SETUP_TRUSTED_PEERS$/m, 'the operator policy reaches the launcher without a hard-coded address');
assert.match(compose, /^\s+- GEV_ALLOWED_HOSTS$/m, 'the host allowlist reaches Vite');
assert.doesNotMatch(compose, /network_mode/, 'the container keeps its own network namespace');
+ assert.match(compose, /^\s+- \.:\/app:z$/m, 'SELinux hosts can read the bind-mounted checkout');
});