Message ID | 20180125024317.14709-7-dja@axtens.net |
---|---|
State | Accepted |
Headers | show |
Series | Various fixes | expand |
On Thu, 2018-01-25 at 13:43 +1100, Daniel Axtens wrote: > This is needed to support py3.6-django111 in tox - otherwise tox > fails. > > Python3.6 is not in Xenial, so this - irritatingly - requires pulling > in either a PPA, or the package from Artful. PPAs are icky, so pull > it in from Artful. > > We can either add an Artful repo (like we do for Trusty to pull in > python3.4), or move the image to Artful and add in the Xenial repo > to get python3.5. It's more efficient to move the entire image to > Artful and pull in 3.5 from Xenial - otherwise most packages get > downloaded from Artful anyway. It does mean we're going to need to > move again to Bionic in a few months, but we'll just have to deal. > > Signed-off-by: Daniel Axtens <dja@axtens.net> I do wish Ubuntu shipped multiple Python versions the way Fedora does but alas, it does not. In any case, this seems fine to me. We should definitely bump this to 18.04 and use the 2.0 format Dockerfile once 18.04 is out. Reviewed-by: Stephen Finucane <stephen@that.guru>
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 946c646188e5..eb6d35d82528 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu +FROM ubuntu:17.10 ARG UID=1000 @@ -12,14 +12,15 @@ ENV DEBIAN_FRONTEND noninteractive ENV PYTHONUNBUFFERED 1 # System -# python3.4-minimal libpython3.4-stdlib libpython3.4-minimal \ -# findutils is for python3.4... :/ +# trusty and findutils is for python3.4 +# xenial is for python3.5 COPY tools/docker/trusty.list /etc/apt/sources.list.d/trusty.list +COPY tools/docker/xenial.list /etc/apt/sources.list.d/xenial.list 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.4-dev findutils=4.4.2-7 python3.6-dev \ libmysqlclient-dev mysql-client curl unzip xvfb chromium-chromedriver \ chromium-browser build-essential git postgresql-client && \ ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/ diff --git a/tools/docker/xenial.list b/tools/docker/xenial.list new file mode 100644 index 000000000000..a70ff56aa552 --- /dev/null +++ b/tools/docker/xenial.list @@ -0,0 +1,3 @@ +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
This is needed to support py3.6-django111 in tox - otherwise tox fails. Python3.6 is not in Xenial, so this - irritatingly - requires pulling in either a PPA, or the package from Artful. PPAs are icky, so pull it in from Artful. We can either add an Artful repo (like we do for Trusty to pull in python3.4), or move the image to Artful and add in the Xenial repo to get python3.5. It's more efficient to move the entire image to Artful and pull in 3.5 from Xenial - otherwise most packages get downloaded from Artful anyway. It does mean we're going to need to move again to Bionic in a few months, but we'll just have to deal. Signed-off-by: Daniel Axtens <dja@axtens.net> --- tools/docker/Dockerfile | 9 +++++---- tools/docker/xenial.list | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 tools/docker/xenial.list