3 # - `docker build --no-cache --pull --file Dockerfile.auth-41.ubuntu-bionic --tag auth-41.ubuntu-bionic .`
4 # - `docker run -it auth-41.ubuntu-bionic`
5 # - `docker run -it auth-41.ubuntu-bionic /bin/bash`
8 if [ "$1" = "" -o "$1" = "-?" -o "$1" = "-h" -o "$1" = "--help" ]; then
9 echo "Usage: generate-repo-files.sh RELEASE"
11 echo " • RELEASE: [ auth-40 | auth-41 | auth-42 | auth-43 |"
12 echo " rec-40 | rec-41 | rec-42 | rec-43 |"
25 cat <<EOF > Dockerfile.$RELEASE.$OS-$VERSION
28 RUN yum install -y epel-release bind-utils
31 if [ "$VERSION" = "6" -o "$VERSION" = "7" ]; then
32 cat <<EOF >> Dockerfile.$RELEASE.$OS-$VERSION
33 RUN yum install -y yum-plugin-priorities
37 cat <<EOF >> Dockerfile.$RELEASE.$OS-$VERSION
38 RUN curl -o /etc/yum.repos.d/powerdns-$RELEASE.repo https://repo.powerdns.com/repo-files/$OS-$RELEASE.repo
39 RUN yum install -y $PKG
42 if [ "$RELEASE" = "rec-43" ]; then
43 cat <<EOF >> Dockerfile.$RELEASE.$OS-$VERSION
45 RUN mkdir /var/run/pdns-recursor
49 cat <<EOF >> Dockerfile.$RELEASE.$OS-$VERSION
56 write_debian_or_ubuntu
()
63 cat <<EOF > pdns.list.$RELEASE.$OS-$VERSION
64 deb [arch=amd64] http://repo.powerdns.com/$OS $VERSION-$RELEASE main
67 # For the following two maybe only create depending on package, but
68 # it's not really a big deal.
71 cat <<EOF > dnsdist.debian-and-ubuntu
73 Pin: origin repo.powerdns.com
78 cat <<EOF > pdns.debian-and-ubuntu
80 Pin: origin repo.powerdns.com
84 cat <<EOF > Dockerfile.$RELEASE.$OS-$VERSION
88 RUN apt-get install -y curl gnupg dnsutils
90 COPY dnsdist.debian-and-ubuntu /etc/apt/preferences.d/dnsdist
91 COPY pdns.debian-and-ubuntu /etc/apt/preferences.d/pdns
92 COPY pdns.list.$RELEASE.$OS-$VERSION /etc/apt/sources.list.d/pdns.list
94 RUN curl https://repo.powerdns.com/FD380FBB-pub.asc | apt-key add -
96 RUN apt-get install -y $PKG
99 if [ "$RELEASE" = "rec-43" ]; then
100 cat <<EOF >> Dockerfile.$RELEASE.$OS-$VERSION
102 RUN mkdir /var/run/pdns-recursor
106 cat <<EOF >> Dockerfile.$RELEASE.$OS-$VERSION
115 write_debian_or_ubuntu debian
$1 $2 $3
121 write_debian_or_ubuntu ubuntu
$1 $2 $3
127 if [ "$RELEASE" = "auth-40" ]; then
128 write_centos
6 pdns pdns_server
129 write_centos
7 pdns pdns_server
130 write_debian jessie pdns-server pdns_server
131 write_debian stretch pdns-server pdns_server
132 write_ubuntu trusty pdns-server pdns_server
133 write_ubuntu xenial pdns-server pdns_server
134 elif [ "$RELEASE" = "auth-41" ]; then
135 write_centos
6 pdns pdns_server
136 write_centos
7 pdns pdns_server
137 write_debian jessie pdns-server pdns_server
138 write_debian stretch pdns-server pdns_server
139 write_ubuntu trusty pdns-server pdns_server
140 write_ubuntu xenial pdns-server pdns_server
141 write_ubuntu bionic pdns-server pdns_server
142 elif [ "$RELEASE" = "auth-42" -o "$RELEASE" = "auth-43" ]; then
143 write_centos
6 pdns pdns_server
144 write_centos
7 pdns pdns_server
145 write_centos
8 pdns pdns_server
146 write_debian stretch pdns-server pdns_server
147 write_debian buster pdns-server pdns_server
148 write_ubuntu xenial pdns-server pdns_server
149 write_ubuntu bionic pdns-server pdns_server
150 elif [ "$RELEASE" = "rec-40" ]; then
151 write_centos
6 pdns-recursor pdns_recursor
152 write_centos
7 pdns-recursor pdns_recursor
153 write_debian jessie pdns-recursor pdns_recursor
154 write_debian stretch pdns-recursor pdns_recursor
155 write_ubuntu trusty pdns-recursor pdns_recursor
156 write_ubuntu xenial pdns-recursor pdns_recursor
157 elif [ "$RELEASE" = "rec-41" ]; then
158 write_centos
6 pdns-recursor pdns_recursor
159 write_centos
7 pdns-recursor pdns_recursor
160 write_debian jessie pdns-recursor pdns_recursor
161 write_debian stretch pdns-recursor pdns_recursor
162 write_ubuntu trusty pdns-recursor pdns_recursor
163 write_ubuntu xenial pdns-recursor pdns_recursor
164 write_ubuntu bionic pdns-recursor pdns_recursor
165 elif [ "$RELEASE" = "rec-42" -o "$RELEASE" = "rec-43" ]; then
166 write_centos
6 pdns-recursor pdns_recursor
167 write_centos
7 pdns-recursor pdns_recursor
168 write_centos
8 pdns-recursor pdns_recursor
169 write_debian stretch pdns-recursor pdns_recursor
170 write_debian buster pdns-recursor pdns_recursor
171 write_ubuntu xenial pdns-recursor pdns_recursor
172 write_ubuntu bionic pdns-recursor pdns_recursor
173 elif [ "$RELEASE" = "dnsdist-15" ]; then
174 write_centos
6 dnsdist dnsdist
175 write_centos
7 dnsdist dnsdist
176 write_centos
8 dnsdist dnsdist
177 write_debian stretch dnsdist dnsdist
178 write_debian buster dnsdist dnsdist
179 write_ubuntu xenial dnsdist dnsdist
180 write_ubuntu bionic dnsdist dnsdist
182 echo "Invalid release: $RELEASE"