@@ -15,28 +15,12 @@ ENV DJANGO_SETTINGS_MODULE patchwork.settings.dev
ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONUNBUFFERED 1
-
# System
-# trusty and findutils is for python3.4; xenial is for python3.5
-# TODO(stephenfin): Are curl, unzip required?
-COPY tools/docker/*.list /etc/apt/sources.list.d/
-
-RUN cd /etc/apt/sources.list.d; \
- echo $(uname -m) > /tmp/arch; \
- if [ $(cat /tmp/arch) != 'x86_64' ] && grep -q -v "i.86" /tmp/arch; then \
- mv trusty-ports.list trusty.list; \
- mv xenial-ports.list xenial.list; \
- else \
- rm *-ports.list; \
- fi
-
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends --allow-downgrades \
- python-dev python-pip python-setuptools python-wheel \
- python3.5-dev python3-pip python3-setuptools python3-wheel \
- python3.4-dev findutils=4.4.2-7 python3.6-dev \
- libmysqlclient-dev mysql-client curl unzip build-essential \
- git postgresql-client tzdata libpq-dev
+ python3-pip python3-setuptools python3-wheel python3-dev \
+ mysql-client libmysqlclient-dev postgresql-client libpq-dev \
+ tzdata build-essential
# User
RUN useradd --uid=$UID --create-home patchwork
@@ -49,10 +33,7 @@ RUN rm /etc/localtime; ln -s /usr/share/zoneinfo/$TZ /etc/localtime
# entrypoint.sh will prompt you to do this.
# we install both Python 2 and Python 3 versions so you can use either
COPY requirements-*.txt /tmp/
-RUN pip3 install virtualenv tox && \
- pip3 install -r /tmp/requirements-dev.txt
-RUN pip2 install virtualenv tox && \
- pip2 install -r /tmp/requirements-dev.txt
+RUN pip3 install -r /tmp/requirements-dev.txt
# we deliberately leave the requirements files in tmp so we can
# ping the user in entrypoint.sh if the change them!
@@ -126,8 +126,8 @@ elif [ "$1" == "--test" ] || [ "$1" == "--quick-test" ]; then
shift
python3 manage.py test $@
elif [ "$1" == "--tox" ] || [ "$1" == "--quick-tox" ]; then
- shift
- tox $@
+ echo "tox is no longer installed here; use e.g. 'tox -e py36-django21-mysql' instead"
+ exit 0
else # run whatever CMD is set to
$@
fi
deleted file mode 100644
@@ -1,3 +0,0 @@
-deb http://ports.ubuntu.com/ubuntu-ports/ trusty main
-deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main
-deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main
deleted file mode 100644
@@ -1,3 +0,0 @@
-deb http://archive.ubuntu.com/ubuntu/ trusty main
-deb http://archive.ubuntu.com/ubuntu/ trusty-updates main
-deb http://security.ubuntu.com/ubuntu trusty-security main
deleted file mode 100644
@@ -1,3 +0,0 @@
-deb http://ports.ubuntu.com/ubuntu-ports/ xenial main
-deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main
-deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main
deleted file mode 100644
@@ -1,3 +0,0 @@
-deb http://archive.ubuntu.com/ubuntu/ xenial main
-deb http://archive.ubuntu.com/ubuntu/ xenial-updates main
-deb http://security.ubuntu.com/ubuntu xenial-security main
Now that we can run tox on the localhost, we no longer need to install the variety of Python versions we previously did and can keep this purely for the 'manage.py' use cases. Signed-off-by: Stephen Finucane <stephen@that.guru> --- v3: - Re-add the 'build-essential' package to the install, as that was necessary - Stop installing 'virtualenv' and 'tox' - Remove unrelated changes to 'tox.ini' --- tools/docker/Dockerfile | 27 ++++----------------------- tools/docker/entrypoint.sh | 4 ++-- tools/docker/trusty-ports.list | 3 --- tools/docker/trusty.list | 3 --- tools/docker/xenial-ports.list | 3 --- tools/docker/xenial.list | 3 --- 6 files changed, 6 insertions(+), 37 deletions(-) delete mode 100644 tools/docker/trusty-ports.list delete mode 100644 tools/docker/trusty.list delete mode 100644 tools/docker/xenial-ports.list delete mode 100644 tools/docker/xenial.list