Spaces:
Running
Running
File size: 914 Bytes
6f08445 f51b0da 6f08445 4f11d72 6f08445 743f2b0 b043196 5b5d91c cd1ea33 6f08445 925f4ba 6f08445 b043196 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# Use the official SearxNG image as the base
FROM docker.io/searxng/searxng:latest
# Switch to root user to adjust permissions
USER root
ENV DEFAULT_BIND_ADDRESS="0.0.0.0:7860"
ENV BIND_ADDRESS="${BIND_ADDRESS:-${DEFAULT_BIND_ADDRESS}}"
# Define directories to exclude from chmod
ENV EXCLUDE_DIRS="/dev /proc /sys /etc /run /var/lib/docker /var/run /usr /tmp /var/tmp /mnt /media"
# Apply chmod 777 recursively, excluding specified directories
RUN for DIR in $EXCLUDE_DIRS; do \
echo "Excluding $DIR from chmod"; \
done && \
find / \
$(printf "! -path %s/* " $EXCLUDE_DIRS) \
-a ! $(printf "! -path %s" $EXCLUDE_DIRS | paste -sd " -o " -) \
-exec chmod 777 {} \; || true
# RUN mkdir /etc/searxng
COPY . .
RUN chmod -R 777 /etc/searxng
COPY settings.yml /etc/searxng/settings.yml
# Expose the port that SearxNG listens on
EXPOSE 7860
CMD './run.sh' && bash dumper.sh
|