| | |
| | FROM python:3.10-slim |
| |
|
| | |
| | RUN apt-get update && apt-get install -y git sqlite3 && rm -rf /var/lib/apt/lists/* |
| |
|
| | |
| | RUN useradd -m searxng |
| | USER searxng |
| | WORKDIR /home/searxng |
| |
|
| | |
| | RUN git clone --depth=1 https://github.com/searxng/searxng.git |
| |
|
| | |
| | WORKDIR /home/searxng/searxng |
| | RUN pip install --no-cache-dir -r requirements.txt |
| |
|
| | |
| | RUN mkdir -p /home/searxng/searxng/searx /home/searxng/searxng/config |
| |
|
| | |
| | RUN python3 -c 'import secrets, os; os.makedirs("/home/searxng/searxng/searx", exist_ok=True); open("/home/searxng/searxng/searx/settings.yml", "w").write(f"server:\n secret_key: \"{secrets.token_hex(32)}\"\n")' |
| |
|
| | |
| | RUN touch /home/searxng/searxng/config/limiter.toml |
| |
|
| | |
| | ENV PYTHONWARNINGS=ignore SQLITE_BUSY_TIMEOUT=5000 SEARXNG_SETTINGS_PATH=/home/searxng/searxng/config/ |
| |
|
| | |
| | EXPOSE 7860 |
| |
|
| | |
| | CMD ["python", "-m", "searx.webapp", "--port", "7860"] |