<commit_before>FROM dockerfile/python
MAINTAINER <NAME> <<EMAIL>>

RUN adduser --disabled-login --home /user \
 --gecos 'Generic unprivileged user' user

RUN install -d -m 01777 /pipcache
ENV PIP_DOWNLOAD_CACHE /pipcache

RUN pip install tox

# Install some common OpenStack system dependencies
RUN apt-get -q update && apt-get -qy install \
 git-core \
 graphviz \
 libffi-dev \
 libmysqlclient-dev \
 libpq-dev \
 libsqlite3-dev \
 libssl-dev \
 libvirt-dev \
 libxml2-dev \
 libxslt-dev \
 pkg-config \
 python-dev \
 python-pip

ENV HOME /user
WORKDIR /app
RUN chown user:user /app
USER user

ONBUILD COPY tox.ini /app/
ONBUILD COPY setup.py /app/
# FIXME(gus): This needs to use a docker1.3 glob to be useful
ONBUILD COPY requirements.txt /app/
ONBUILD COPY test-requirements.txt /app/

# The idea here is that the above files change rarely, and we'd like
# docker to setup+cache+reuse the venv as much as possible.
ONBUILD RUN tox --notest -c /app/tox.ini --installpkg /dev/null

ONBUILD COPY sdist.zip /tmp/

# Unpack sdist.zip into /app.  Some mucking around to deal with the
# unknown directory prefix that tox --sdistonly generates.
ONBUILD RUN \
 unzip -q /tmp/sdist.zip -d /tmp/exdir && \
 find /tmp/exdir -mindepth 2 -maxdepth 2 -print0 | xargs -0 mv -t /app && \<commit_msg>Move away from deprecated dockerfile/python base image<commit_after>FROM python
MAINTAINER <NAME> <<EMAIL>>

RUN adduser --disabled-login --home /user \
 --gecos 'Generic unprivileged user' user

RUN install -d -m 01777 /pipcache
ENV PIP_DOWNLOAD_CACHE /pipcache

RUN pip install tox

# Install some common OpenStack system dependencies
RUN apt-get -q update && apt-get -qy install \
 git-core \
 graphviz \
 libffi-dev \
 libmysqlclient-dev \
 libpq-dev \
 libsqlite3-dev \
 libssl-dev \
 libvirt-dev \
 libxml2-dev \
 libxslt-dev \
 pkg-config \
 python-dev \
 python-pip

ENV HOME /user
WORKDIR /app
RUN chown user:user /app
USER user

ONBUILD COPY tox.ini setup.py *requirements.txt /app/

# The idea here is that the above files change rarely, and we'd like
# docker to setup+cache+reuse the venv as much as possible.
ONBUILD RUN tox --notest -c /app/tox.ini --installpkg /dev/null

ONBUILD COPY sdist.zip /tmp/

# Unpack sdist.zip into /app.  Some mucking around to deal with the
# unknown directory prefix that tox --sdistonly generates.
ONBUILD RUN \
 unzip -q /tmp/sdist.zip -d /tmp/exdir && \
 find /tmp/exdir -mindepth 2 -maxdepth 2 -print0 | xargs -0 mv -t /app && \
{'fraction_non_alphanumeric': 0.10056772100567721, 'fraction_numerical': 0.009732360097323601, 'mean_word_length': 3.0980066445182723, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, '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': '3942120', 'n_tokens_mistral': 888, 'n_tokens_neox': 843, 'n_words': 311}