2018-10-16 04:14:58 +02:00
|
|
|
FROM docker:18.06.1 as docker
|
2018-02-03 00:18:55 +01:00
|
|
|
FROM python:3.6
|
2015-02-23 12:01:37 +01:00
|
|
|
|
2015-02-25 14:52:55 +01:00
|
|
|
RUN set -ex; \
|
|
|
|
apt-get update -qq; \
|
|
|
|
apt-get install -y \
|
2015-08-25 00:54:59 +02:00
|
|
|
locales \
|
2018-02-03 00:18:55 +01:00
|
|
|
python-dev \
|
|
|
|
git
|
2015-02-25 14:52:55 +01:00
|
|
|
|
2018-10-16 04:14:58 +02:00
|
|
|
COPY --from=docker /usr/local/bin/docker /usr/local/bin/docker
|
2015-09-16 22:45:26 +02:00
|
|
|
|
2015-08-25 00:54:59 +02:00
|
|
|
# Python3 requires a valid locale
|
|
|
|
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
|
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
|
2014-09-30 20:54:13 +02:00
|
|
|
RUN useradd -d /home/user -m -s /bin/bash user
|
2014-01-16 18:28:47 +01:00
|
|
|
WORKDIR /code/
|
2014-07-30 22:11:11 +02:00
|
|
|
|
2019-02-05 10:51:26 +01:00
|
|
|
# FIXME(chris-crone): virtualenv 16.3.0 breaks build, force 16.2.0 until fixed
|
|
|
|
RUN pip install virtualenv==16.2.0
|
2015-09-16 22:45:26 +02:00
|
|
|
RUN pip install tox==2.1.1
|
2015-07-03 04:35:20 +02:00
|
|
|
|
2014-07-30 22:11:11 +02:00
|
|
|
ADD requirements.txt /code/
|
2015-03-26 23:28:02 +01:00
|
|
|
ADD requirements-dev.txt /code/
|
2015-09-16 22:45:26 +02:00
|
|
|
ADD .pre-commit-config.yaml /code/
|
|
|
|
ADD setup.py /code/
|
|
|
|
ADD tox.ini /code/
|
|
|
|
ADD compose /code/compose/
|
2019-02-05 10:51:26 +01:00
|
|
|
ADD README.md /code/
|
2015-09-16 22:45:26 +02:00
|
|
|
RUN tox --notest
|
2015-08-24 21:15:08 +02:00
|
|
|
|
2014-01-16 18:28:47 +01:00
|
|
|
ADD . /code/
|
2014-09-30 20:54:13 +02:00
|
|
|
RUN chown -R user /code/
|
2014-11-20 18:23:43 +01:00
|
|
|
|
2018-02-03 00:18:55 +01:00
|
|
|
ENTRYPOINT ["/code/.tox/py36/bin/docker-compose"]
|