Update Dockerfile
Browse files- Dockerfile +9 -2
Dockerfile
CHANGED
|
@@ -1,11 +1,18 @@
|
|
| 1 |
# Use the official SearXNG image
|
| 2 |
FROM searxng/searxng:latest
|
| 3 |
|
| 4 |
-
# Set
|
| 5 |
ENV PORT=7860
|
| 6 |
|
| 7 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
EXPOSE 7860
|
| 9 |
|
|
|
|
|
|
|
|
|
|
| 10 |
# Start SearXNG
|
| 11 |
CMD ["gunicorn", "-b", "0.0.0.0:7860", "searx.webapp:app"]
|
|
|
|
| 1 |
# Use the official SearXNG image
|
| 2 |
FROM searxng/searxng:latest
|
| 3 |
|
| 4 |
+
# Set environment variables
|
| 5 |
ENV PORT=7860
|
| 6 |
|
| 7 |
+
# Ensure /etc/searxng is writable
|
| 8 |
+
USER root
|
| 9 |
+
RUN mkdir -p /etc/searxng && chmod -R 777 /etc/searxng
|
| 10 |
+
|
| 11 |
+
# Expose the correct port for Hugging Face Spaces
|
| 12 |
EXPOSE 7860
|
| 13 |
|
| 14 |
+
# Switch back to non-root user for security
|
| 15 |
+
USER searxng
|
| 16 |
+
|
| 17 |
# Start SearXNG
|
| 18 |
CMD ["gunicorn", "-b", "0.0.0.0:7860", "searx.webapp:app"]
|