Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix(docker): Keep test container as root for CI compatibility

LearningCircuit61006971a34a
diff --git a/Dockerfile b/Dockerfile
index 5ca5326625..aa3f045155 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -90,17 +90,8 @@ ENV DOCKER_ENV=true
# Don't skip Chrome download - let Puppeteer download its own Chrome as fallback
# ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
-# Create non-root user for running tests (UID 1000 is standard for first non-root user)
-# Use -m to create home directory for platformdirs compatibility
-RUN groupadd -r ldruser && useradd -r -g ldruser -u 1000 -m -d /home/ldruser ldruser
-
-# Create directories with proper permissions for non-root user
-# - puppeteer-cache: for Puppeteer/Chrome cache
-# - /app/.config: for application configuration volume
-# - /home/ldruser/.local: for platformdirs data directory
-RUN mkdir -p /app/puppeteer-cache /app/.config/local_deep_research /home/ldruser/.local/share && \
- chown -R ldruser:ldruser /app /home/ldruser && \
- chmod -R 755 /app /home/ldruser
+# Create puppeteer cache directory with proper permissions
+RUN mkdir -p /app/puppeteer-cache && chmod -R 755 /app/puppeteer-cache
# Install Playwright with Chromium first (before npm packages)
RUN playwright install --with-deps chromium || echo "Playwright install failed, will use Puppeteer's Chrome"
@@ -117,36 +108,27 @@ RUN npm install
WORKDIR /install/tests/ui_tests
RUN npm install
-# Copy Playwright Chrome to a location accessible by ldruser and set permissions
-RUN mkdir -p /app/playwright-cache && \
- cp -r /root/.cache/ms-playwright/* /app/playwright-cache/ 2>/dev/null || true && \
- chown -R ldruser:ldruser /app/playwright-cache && \
- chmod -R 755 /app/playwright-cache
-
# Use pipefail to catch errors in piped commands
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Set CHROME_BIN to help Puppeteer find Chrome from Playwright
# Try to find and set Chrome binary path from Playwright's installation
-RUN CHROME_PATH=$(find /app/playwright-cache -name chrome -type f 2>/dev/null | head -1) && \
+RUN CHROME_PATH=$(find /root/.cache/ms-playwright -name chrome -type f 2>/dev/null | head -1) && \
if [ -n "$CHROME_PATH" ]; then \
echo "export CHROME_BIN=$CHROME_PATH" >> /etc/profile.d/chrome.sh; \
echo "export PUPPETEER_EXECUTABLE_PATH=$CHROME_PATH" >> /etc/profile.d/chrome.sh; \
fi || true
-# Set environment variables for Puppeteer to use Playwright's Chrome (copied to /app)
+# Set environment variables for Puppeteer to use Playwright's Chrome
ENV PUPPETEER_SKIP_DOWNLOAD=true
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
-# Use path in /app which is accessible by ldruser
-ENV PUPPETEER_EXECUTABLE_PATH=/app/playwright-cache/chromium-1181/chrome-linux/chrome
-ENV PLAYWRIGHT_BROWSERS_PATH=/app/playwright-cache
+ENV PUPPETEER_EXECUTABLE_PATH=/root/.cache/ms-playwright/chromium-1181/chrome-linux/chrome
# Copy test files to /app where they will be run from
RUN mkdir -p /app && cp -r /install/tests /app/
-# Ensure all /app directories have correct ownership for ldruser
-RUN chown -R ldruser:ldruser /app && \
- chmod -R 755 /app
+# Ensure Chrome binaries have correct permissions
+RUN chmod -R 755 /app/puppeteer-cache
WORKDIR /install
@@ -157,8 +139,9 @@ RUN pdm install --no-editable
# Configure path to default to the venv python.
ENV PATH="/install/.venv/bin:$PATH"
-# Switch to non-root user for running tests (security best practice)
-USER ldruser
+# Note: Test container runs as root because CI workflows mount source code
+# volumes that are owned by root. The production container (ldr) runs as
+# non-root user for security.
####
# Runs the LDR service.