<commit_before>FROM python:2.7-slim

WORKDIR /app

RUN useradd searx

EXPOSE 5000
CMD ["/usr/local/bin/uwsgi", "--uid", "searx", "--gid", "searx", "--http", ":5000", "-w",  "searx.webapp"]

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
            zlib1g-dev libxml2-dev libxslt1-dev libffi-dev build-essential \
            libssl-dev openssl && \
    rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache uwsgi

COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache -r requirements.txt

COPY . /app
RUN sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml<commit_msg>Better Docker embedded support<commit_after>FROM alpine:3.3
MAINTAINER Wonderfall <<EMAIL>>

ENV BASE_URL=False IMAGE_PROXY=False

COPY . /usr/local/searx

RUN apk -U add \
    build-base \
    python \
    python-dev \
    py-pip \
    libxml2 \
    libxml2-dev \
    libxslt \
    libxslt-dev \
    libffi-dev \
    openssl \
    openssl-dev \
    ca-certificates \
 && adduser -D -h /usr/local/searx -s /bin/sh searx searx \
 && cd /usr/local/searx \
 && pip install --no-cache -r requirements.txt \
 && sed -i "s/127.0.0.1/0.0.0.0/g" searx/settings.yml \
 && sed -i "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml \
 && sed -i "s|base_url : False|base_url : $BASE_URL|g" searx/settings.yml \
 && sed -i "s/image_proxy : False/image_proxy : $IMAGE_PROXY/g" searx/settings.yml \
 && apk del \
    build-base \
    python-dev \
    py-pip\
    libffi-dev \
    openssl-dev \
    libxslt-dev \
    libxml2-dev \
    openssl-dev \
    ca-certificates \
 && chown -R searx:searx /usr/local/searx \
 && rm -f /var/cache/apk/*

EXPOSE 8888
USER searx
WORKDIR /usr/local/searx
CMD ["python", "searx/webapp.py"]
{'fraction_non_alphanumeric': 0.15498575498575498, 'fraction_numerical': 0.020512820512820513, 'mean_word_length': 2.4031007751937983, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4344898', 'n_tokens_mistral': 739, 'n_tokens_neox': 695, 'n_words': 154}