From patchwork Thu Oct 17 10:34:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 1178454 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 46v5FV1TkTz9sNx for ; Thu, 17 Oct 2019 21:37:02 +1100 (AEDT) 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="iTZkPTvg"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46v5FT5yskzDqQb for ; Thu, 17 Oct 2019 21:37:01 +1100 (AEDT) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=that.guru (client-ip=199.181.239.246; helo=relay0246.mxlogin.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="iTZkPTvg"; dkim-atps=neutral Received: from relay0246.mxlogin.com (relay0246.mxlogin.com [199.181.239.246]) (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 46v5BQ6hbxzDr8L for ; Thu, 17 Oct 2019 21:34:21 +1100 (AEDT) Received: from filter004.mxroute.com (unknown [94.130.183.33]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay0246.mxlogin.com (Postfix) with ESMTPS id 8303ACD4030C for ; Thu, 17 Oct 2019 05:34:17 -0500 (CDT) Received: from one.mxroute.com (one.mxroute.com [195.201.59.211]) by filter004.mxroute.com (Postfix) with ESMTPS id 2DC523E809 for ; Thu, 17 Oct 2019 10:34:15 +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: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: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=D9vCM6yXPixU/+Qct6+cFu70/aVk917aOZcdtxLfvJw=; b=iTZkPTvgMP/jRUR7KPErDLoXaw Zm37+UMPS+fQpyERaAP8TeqSME8h0GffpR9a9I+P1KdvJsF5YnOZ7Kc7pByVBBBzkwT1ju9+nthv5 1lEDwl/BI7263j+m2gvrhg47hqg21rHE1CcrfxmPYbDgXLog/N193aQkVluwZXGaedQWTcdS7Enp7 APtqxwGFXwpObp4ULTPuHCGGJ//azWLgpuwWgsXRxqIa1+FbxTkw2uswoc2mLgmqbv8alPcP7J/Vj xy/J6257npvQ6yNZ1I9HwjTl2zJEnzrgQwWlz15PhCQqja5XcVhEXsZrHtyQ4Ejc9jzHioKkpjvl6 +KS06iJA==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH v2 1/3] docker: Rely on caching Date: Thu, 17 Oct 2019 11:34:06 +0100 Message-Id: <20191017103408.28275-1-stephen@that.guru> X-Mailer: git-send-email 2.21.0 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" It seems less likely that tox and tox-pyenv will change than our requirements. Split up the 'RUN' steps so we don't have to reinstall the former every time the latter change. Signed-off-by: Stephen Finucane --- tools/docker/Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git tools/docker/Dockerfile tools/docker/Dockerfile index 35324b13..79408041 100644 --- tools/docker/Dockerfile +++ tools/docker/Dockerfile @@ -47,15 +47,14 @@ RUN pyenv latest install 2.7 && \ pyenv latest install 3.5 && \ pyenv latest install 3.6 && \ pyenv latest install 3.7 - RUN pyenv global $(pyenv versions --bare | tac) -COPY requirements-*.txt /tmp/ -RUN pip install tox tox-pyenv && \ - pip install -r /tmp/requirements-dev.txt +RUN pip install tox tox-pyenv -# we deliberately leave the requirements files in tmp so we can -# ping the user in entrypoint.sh if the change them! +# we deliberately leave the requirements files in tmp so we can ping the user +# in entrypoint.sh if they change +COPY requirements-dev.txt requirements-test.txt /opt/ +RUN pip install -r /opt/requirements-dev.txt COPY tools/docker/entrypoint.sh /usr/local/bin/entrypoint.sh ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]