|
|
|
FROM python:3.10 |
|
|
|
|
|
WORKDIR /code |
|
|
|
|
|
RUN pip install --upgrade pip |
|
|
|
|
|
RUN git clone https://github.com/searx/searx.git /code/searx-src |
|
|
|
|
|
RUN cp /code/searx-src/searx/webapp.py /code/searx/ |
|
|
|
|
|
RUN pip install --no-build-isolation PyYAML==6.0 |
|
|
|
|
|
RUN pip install --pre --no-build-isolation lxml==4.9.2 |
|
|
|
|
|
RUN pip install -r /code/searx-src/requirements.txt |
|
|
|
|
|
|
|
ENV VIRTUAL_ENV=/usr/local/searx/searx-pyenv |
|
RUN echo "source $VIRTUAL_ENV/bin/activate" > /etc/profile.d/searx-pyenv.sh |
|
|
|
|
|
RUN useradd -m -s /bin/bash searx && chown -R searx:searx /code |
|
USER searx |
|
|
|
|
|
ENV SEARX_SETTINGS_PATH=/etc/searx/settings.yml |
|
|
|
|
|
RUN mkdir -p /etc/searx && cp /code/searx-src/utils/templates/etc/searx/use_default_settings.yml /etc/searx/settings.yml |
|
|
|
|
|
EXPOSE 8888 |
|
|
|
|
|
CMD ["python", "/code/searx/webapp.py"] |