Hiren122 commited on
Commit
590deb1
·
verified ·
1 Parent(s): ab87002

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -26
Dockerfile CHANGED
@@ -1,33 +1,16 @@
1
- FROM python:3.11-slim
 
2
 
3
- # Env vars
4
- ENV SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml
5
  ENV SEARXNG_BIND_ADDRESS=0.0.0.0
6
  ENV SEARXNG_PORT=7860
7
 
8
- # System deps
9
- RUN apt-get update && apt-get install -y \
10
- build-essential \
11
- libxslt-dev \
12
- libxml2-dev \
13
- libffi-dev \
14
- curl \
15
- && rm -rf /var/lib/apt/lists/*
16
-
17
- # User
18
- RUN useradd -m searxng
19
-
20
- # Install SearXNG
21
- RUN pip install --no-cache-dir searxng
22
-
23
- # Config
24
- RUN mkdir -p /etc/searxng
25
- COPY settings.yml /etc/searxng/settings.yml
26
- RUN chown -R searxng:searxng /etc/searxng
27
-
28
- USER searxng
29
 
 
30
  EXPOSE 7860
31
 
32
- # START SearXNG (correct way)
33
- CMD ["python", "-m", "searxng.webapp"]
 
1
+ # Use official SearXNG image
2
+ FROM searxng/searxng:latest
3
 
4
+ # Set config directory
5
+ ENV SEARXNG_SETTINGS_PATH=/app/searxng/settings.yml
6
  ENV SEARXNG_BIND_ADDRESS=0.0.0.0
7
  ENV SEARXNG_PORT=7860
8
 
9
+ # Copy your settings
10
+ COPY settings.yml /app/searxng/settings.yml
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
+ # Expose default port
13
  EXPOSE 7860
14
 
15
+ # Start SearXNG
16
+ CMD ["searxng"]