From 41c5bd75c0f179d215614517c8d6975bba7decf3 Mon Sep 17 00:00:00 2001 From: Chris Hill Scott Date: Tue, 4 Jul 2017 11:24:37 +0100 Subject: [PATCH 1/2] Use newer version of libcairo without compiling it Stumbled across this while trying to get this app running on my new Mac: https://github.com/aquavitae/docker-weasyprint/pull/4 Does what we tried to do in https://github.com/alphagov/notifications-template-preview/pull/12 but actually seems to work (ie running the tests no longer gives warnings about an outdated version of Cairo). Means we can remove all the jumping about between directories, which is nice. --- docker/Dockerfile | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index cdbeed11..097a3d08 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -30,21 +30,15 @@ RUN \ imagemagick \ gsfonts -WORKDIR /tmp/ - -RUN \ - echo "Downloading newer version of Cairo" \ - && curl https://www.cairographics.org/releases/cairo-1.14.8.tar.xz | tar xvfJ - -C . - -WORKDIR /tmp/cairo-1.14.8/ - -RUN \ - echo "Installing newer version of Cairo" \ - && ./configure \ - && make \ - && make install - -WORKDIR / +RUN echo "Install libcairo2 from stretch" \ + && echo 'APT::Default-Release "stretch";' > /etc/apt/apt.conf \ + && mv /etc/apt/sources.list /etc/apt/sources.list.d/stable.list \ + && echo "deb http://deb.debian.org/debian stretch main" \ + > /etc/apt/sources.list.d/testing.list + +RUN apt-get -y update +RUN apt-get -t stretch install -y libcairo2=1.14.8-1 +RUN apt-get -y clean RUN \ echo "Clean up" \ From b73056c9f59526a5f9ec4690729e43825b8671a8 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 19 Jul 2017 11:08:12 +0100 Subject: [PATCH 2/2] Keep Jessie as default release Refactoring. Adds Stretch as another sources that we can install from. --- docker/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 097a3d08..29177d3c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -31,10 +31,10 @@ RUN \ gsfonts RUN echo "Install libcairo2 from stretch" \ - && echo 'APT::Default-Release "stretch";' > /etc/apt/apt.conf \ - && mv /etc/apt/sources.list /etc/apt/sources.list.d/stable.list \ + && echo 'APT::Default-Release "jessie";' > /etc/apt/apt.conf \ + && mv /etc/apt/sources.list /etc/apt/sources.list.d/jessie.list \ && echo "deb http://deb.debian.org/debian stretch main" \ - > /etc/apt/sources.list.d/testing.list + > /etc/apt/sources.list.d/stretch.list RUN apt-get -y update RUN apt-get -t stretch install -y libcairo2=1.14.8-1