From patchwork Sat Jun 8 17:36:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 1112508 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45LmnN3dygz9sBb for ; Sun, 9 Jun 2019 03:37:44 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="MzkIa91m"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45LmnN2l55zDqxk for ; Sun, 9 Jun 2019 03:37:44 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=that.guru (client-ip=172.82.139.138; helo=qrelay138.mxroute.com; envelope-from=stephen@that.guru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="MzkIa91m"; dkim-atps=neutral Received: from qrelay138.mxroute.com (qrelay138.mxroute.com [172.82.139.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45Lmm41dPKzDqf1 for ; Sun, 9 Jun 2019 03:36:36 +1000 (AEST) Received: from filter002.mxroute.com (unknown [116.203.155.46]) by qrelay138.mxroute.com (Postfix) with ESMTP id A3C73120939 for ; Sat, 8 Jun 2019 13:36:32 -0400 (EDT) Received: from one.mxroute.com (one.mxroute.com [195.201.59.211]) by filter002.mxroute.com (Postfix) with ESMTPS id 108A43F01B for ; Sat, 8 Jun 2019 17:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=o+mT12W9Y+D/9dKM6cfiHB/W90XQfQL61oZ6Q2X6BEc=; b=MzkIa91mZ7fWTNmxoTAS7hhrdP pK0tfeEyNUj9fxoM1g+pyhHnA7rj9X9e9i2PLSs262/LeF7q/g1MTqKGDIDLIOQ7+5CW76IbuMlLt 5J2wQiVJdRd5HQqNX82IcU6izOQRagK/PLPnWguY6LAHTlqFvCfvuv5ZWEcq94qv5AGh2MsUPRoRh boCdPgL+umpdWstvWaYphC9W2DV30b0+oRr/oPQx4nYcTkiU84apshv03Rnts7XsevMTc+QJV8ugo VL2WQ3GNBsTdk1amGqZdLkd9iiLxQHqGHx1ZDJh+k+UxKuJw++0+o/tb800slyCCBC5d3EO3hUX5M NjFlX6iw==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH v3 5/5] docker-compose: Massively simplify Date: Sat, 8 Jun 2019 18:36:22 +0100 Message-Id: <20190608173622.6711-6-stephen@that.guru> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190608173622.6711-1-stephen@that.guru> References: <20190608173622.6711-1-stephen@that.guru> MIME-Version: 1.0 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" 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 --- 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 diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 76bb6b2b..3c30f28e 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -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! diff --git a/tools/docker/entrypoint.sh b/tools/docker/entrypoint.sh index 8a8c99a5..84b0b49f 100755 --- a/tools/docker/entrypoint.sh +++ b/tools/docker/entrypoint.sh @@ -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 diff --git a/tools/docker/trusty-ports.list b/tools/docker/trusty-ports.list deleted file mode 100644 index ebcf4fa4..00000000 --- a/tools/docker/trusty-ports.list +++ /dev/null @@ -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 diff --git a/tools/docker/trusty.list b/tools/docker/trusty.list deleted file mode 100644 index 8bb92c09..00000000 --- a/tools/docker/trusty.list +++ /dev/null @@ -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 diff --git a/tools/docker/xenial-ports.list b/tools/docker/xenial-ports.list deleted file mode 100644 index d84641fa..00000000 --- a/tools/docker/xenial-ports.list +++ /dev/null @@ -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 diff --git a/tools/docker/xenial.list b/tools/docker/xenial.list deleted file mode 100644 index a70ff56a..00000000 --- a/tools/docker/xenial.list +++ /dev/null @@ -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