From: Peter van Dijk Date: Thu, 15 Nov 2018 14:26:52 +0000 (+0100) Subject: builder: add docker cache busting support X-Git-Tag: rec-4.2.0-alpha1~27^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94db630beff9e91915b4c5fdaadfe56868c9d178;p=thirdparty%2Fpdns.git builder: add docker cache busting support --- diff --git a/builder b/builder index 836c9a8f6d..82843ac183 160000 --- a/builder +++ b/builder @@ -1 +1 @@ -Subproject commit 836c9a8f6d9a9c7980076eedde674b4e056f24c3 +Subproject commit 82843ac183ef0f0bf9cdc1367b93c8e9e6fa6dfa diff --git a/builder-support/dockerfiles/Dockerfile.authoritative b/builder-support/dockerfiles/Dockerfile.authoritative index c5d83a19ba..fbfafe29c1 100644 --- a/builder-support/dockerfiles/Dockerfile.authoritative +++ b/builder-support/dockerfiles/Dockerfile.authoritative @@ -1,4 +1,5 @@ FROM alpine:3.6 as pdns-authoritative +ARG BUILDER_CACHE_BUSTER= RUN apk add --no-cache gcc g++ make tar autoconf automake protobuf-dev lua-dev \ libtool file boost-dev curl openssl-dev ragel py-virtualenv \ diff --git a/builder-support/dockerfiles/Dockerfile.dnsdist b/builder-support/dockerfiles/Dockerfile.dnsdist index 659df6d14d..9569c466a5 100644 --- a/builder-support/dockerfiles/Dockerfile.dnsdist +++ b/builder-support/dockerfiles/Dockerfile.dnsdist @@ -1,4 +1,5 @@ FROM alpine:3.6 as dnsdist +ARG BUILDER_CACHE_BUSTER= RUN apk add --no-cache gcc g++ make tar autoconf automake protobuf-dev lua-dev \ libtool file boost-dev ragel py-virtualenv git libedit-dev diff --git a/builder-support/dockerfiles/Dockerfile.recursor b/builder-support/dockerfiles/Dockerfile.recursor index 821eeb7aeb..10e0a699e9 100644 --- a/builder-support/dockerfiles/Dockerfile.recursor +++ b/builder-support/dockerfiles/Dockerfile.recursor @@ -1,4 +1,5 @@ FROM alpine:3.6 as pdns-recursor +ARG BUILDER_CACHE_BUSTER= RUN apk add --no-cache gcc g++ make tar autoconf automake protobuf-dev lua-dev \ libtool file boost-dev curl openssl-dev ragel py-virtualenv \ diff --git a/builder-support/dockerfiles/Dockerfile.target.amazon-2 b/builder-support/dockerfiles/Dockerfile.target.amazon-2 index 464a541b9b..43b17135a2 100644 --- a/builder-support/dockerfiles/Dockerfile.target.amazon-2 +++ b/builder-support/dockerfiles/Dockerfile.target.amazon-2 @@ -4,6 +4,7 @@ # This defines the dstribution base layer # Put only the bare minimum of common commands here, without dev tools FROM amazonlinux:2 as dist-base +ARG BUILDER_CACHE_BUSTER= RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # Do the actual rpm build diff --git a/builder-support/dockerfiles/Dockerfile.target.centos-6 b/builder-support/dockerfiles/Dockerfile.target.centos-6 index 6264453d06..f60feef89b 100644 --- a/builder-support/dockerfiles/Dockerfile.target.centos-6 +++ b/builder-support/dockerfiles/Dockerfile.target.centos-6 @@ -4,6 +4,7 @@ # This defines the dstribution base layer # Put only the bare minimum of common commands here, without dev tools FROM centos:6 as dist-base +ARG BUILDER_CACHE_BUSTER= RUN which yum RUN yum clean all RUN yum install -y --verbose epel-release centos-release-scl-rh && \ diff --git a/builder-support/dockerfiles/Dockerfile.target.centos-7 b/builder-support/dockerfiles/Dockerfile.target.centos-7 index cbf48a4df1..631308285d 100644 --- a/builder-support/dockerfiles/Dockerfile.target.centos-7 +++ b/builder-support/dockerfiles/Dockerfile.target.centos-7 @@ -4,6 +4,7 @@ # This defines the dstribution base layer # Put only the bare minimum of common commands here, without dev tools FROM centos:7 as dist-base +ARG BUILDER_CACHE_BUSTER= RUN yum install -y epel-release # Do the actual rpm build diff --git a/builder-support/dockerfiles/Dockerfile.target.debian-jessie b/builder-support/dockerfiles/Dockerfile.target.debian-jessie index d3967d04fd..33440735d7 100644 --- a/builder-support/dockerfiles/Dockerfile.target.debian-jessie +++ b/builder-support/dockerfiles/Dockerfile.target.debian-jessie @@ -2,6 +2,7 @@ @INCLUDE Dockerfile.target.sdist FROM debian:jessie as dist-base +ARG BUILDER_CACHE_BUSTER= ARG APT_URL RUN apt-get update && apt-get -y dist-upgrade diff --git a/builder-support/dockerfiles/Dockerfile.target.debian-stretch b/builder-support/dockerfiles/Dockerfile.target.debian-stretch index cff29d3904..c775cf63e0 100644 --- a/builder-support/dockerfiles/Dockerfile.target.debian-stretch +++ b/builder-support/dockerfiles/Dockerfile.target.debian-stretch @@ -2,6 +2,7 @@ @INCLUDE Dockerfile.target.sdist FROM debian:stretch as dist-base +ARG BUILDER_CACHE_BUSTER= ARG APT_URL RUN apt-get update && apt-get -y dist-upgrade diff --git a/builder-support/dockerfiles/Dockerfile.target.raspbian-jessie b/builder-support/dockerfiles/Dockerfile.target.raspbian-jessie index 0afdd574fc..3fa259c741 100644 --- a/builder-support/dockerfiles/Dockerfile.target.raspbian-jessie +++ b/builder-support/dockerfiles/Dockerfile.target.raspbian-jessie @@ -2,6 +2,7 @@ @INCLUDE Dockerfile.target.sdist FROM resin/rpi-raspbian:jessie as dist-base +ARG BUILDER_CACHE_BUSTER= ARG APT_URL RUN apt-get update && apt-get -y dist-upgrade diff --git a/builder-support/dockerfiles/Dockerfile.target.raspbian-stretch b/builder-support/dockerfiles/Dockerfile.target.raspbian-stretch index 4624617b3e..4f95c4c162 100644 --- a/builder-support/dockerfiles/Dockerfile.target.raspbian-stretch +++ b/builder-support/dockerfiles/Dockerfile.target.raspbian-stretch @@ -2,6 +2,7 @@ @INCLUDE Dockerfile.target.sdist FROM resin/rpi-raspbian:stretch as dist-base +ARG BUILDER_CACHE_BUSTER= ARG APT_URL RUN apt-get update && apt-get -y dist-upgrade diff --git a/builder-support/dockerfiles/Dockerfile.target.sdist b/builder-support/dockerfiles/Dockerfile.target.sdist index 45c8da1aef..81760329a7 100644 --- a/builder-support/dockerfiles/Dockerfile.target.sdist +++ b/builder-support/dockerfiles/Dockerfile.target.sdist @@ -11,6 +11,7 @@ @ENDIF FROM alpine:3.6 as sdist +ARG BUILDER_CACHE_BUSTER= @IF [ ! -z "$M_authoritative$M_all" ] COPY --from=pdns-authoritative /sdist/ /sdist/ diff --git a/builder-support/dockerfiles/Dockerfile.target.ubuntu-bionic b/builder-support/dockerfiles/Dockerfile.target.ubuntu-bionic index 09a3b4cc88..2b78f08e44 100644 --- a/builder-support/dockerfiles/Dockerfile.target.ubuntu-bionic +++ b/builder-support/dockerfiles/Dockerfile.target.ubuntu-bionic @@ -2,6 +2,7 @@ @INCLUDE Dockerfile.target.sdist FROM ubuntu:bionic as dist-base +ARG BUILDER_CACHE_BUSTER= ARG APT_URL RUN apt-get update && apt-get -y dist-upgrade diff --git a/builder-support/dockerfiles/Dockerfile.target.ubuntu-cosmic b/builder-support/dockerfiles/Dockerfile.target.ubuntu-cosmic index f13c7d1ef6..590d73b4f7 100644 --- a/builder-support/dockerfiles/Dockerfile.target.ubuntu-cosmic +++ b/builder-support/dockerfiles/Dockerfile.target.ubuntu-cosmic @@ -2,6 +2,7 @@ @INCLUDE Dockerfile.target.sdist FROM ubuntu:cosmic as dist-base +ARG BUILDER_CACHE_BUSTER= ARG APT_URL RUN apt-get update && apt-get -y dist-upgrade diff --git a/builder-support/dockerfiles/Dockerfile.target.ubuntu-trusty b/builder-support/dockerfiles/Dockerfile.target.ubuntu-trusty index 8fb1f0f338..46bf2d3219 100644 --- a/builder-support/dockerfiles/Dockerfile.target.ubuntu-trusty +++ b/builder-support/dockerfiles/Dockerfile.target.ubuntu-trusty @@ -2,6 +2,7 @@ @INCLUDE Dockerfile.target.sdist FROM ubuntu:trusty as dist-base +ARG BUILDER_CACHE_BUSTER= ARG APT_URL RUN apt-get update && apt-get -y dist-upgrade diff --git a/builder-support/dockerfiles/Dockerfile.target.ubuntu-xenial b/builder-support/dockerfiles/Dockerfile.target.ubuntu-xenial index 81e3e71d96..92a83e1cbd 100644 --- a/builder-support/dockerfiles/Dockerfile.target.ubuntu-xenial +++ b/builder-support/dockerfiles/Dockerfile.target.ubuntu-xenial @@ -2,6 +2,7 @@ @INCLUDE Dockerfile.target.sdist FROM ubuntu:xenial as dist-base +ARG BUILDER_CACHE_BUSTER= ARG APT_URL RUN apt-get update && apt-get -y dist-upgrade