From fb3e51baa7cfdf3be2c50d4e20d2545badc59c76 Mon Sep 17 00:00:00 2001 From: Claudiu Belu Date: Tue, 14 May 2019 09:53:54 +0000 Subject: [PATCH] test images: Adds CoreDNS to dnsutils and jessie-dnsutils images The dnsutils and jessie-dnsutils images are installing dnsmasq, which is required for a few tests checking custom DNS servers and configurations. dnsmasq is a Linux specific binary. In order for the tests to also pass on Windows, this commit adds CoreDNS to the images, so a later commit will update the tests to use CoreDNS instead of dnsmasq. --- test/images/dnsutils/Dockerfile | 3 +++ test/images/dnsutils/Dockerfile_windows | 27 +++++++++++++++++++++++++ test/images/dnsutils/VERSION | 2 +- test/images/jessie-dnsutils/Dockerfile | 3 +++ test/images/jessie-dnsutils/VERSION | 2 +- 5 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 test/images/dnsutils/Dockerfile_windows diff --git a/test/images/dnsutils/Dockerfile b/test/images/dnsutils/Dockerfile index 5286aacd946..30eb7856960 100644 --- a/test/images/dnsutils/Dockerfile +++ b/test/images/dnsutils/Dockerfile @@ -17,3 +17,6 @@ FROM BASEIMAGE CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/ RUN apk add --no-cache bind-tools dnsmasq + +ADD https://github.com/coredns/coredns/releases/download/v1.5.0/coredns_1.5.0_linux_BASEARCH.tgz /coredns.tgz +RUN tar -xzvf /coredns.tgz && rm -f /coredns.tgz diff --git a/test/images/dnsutils/Dockerfile_windows b/test/images/dnsutils/Dockerfile_windows new file mode 100644 index 00000000000..29b7a8e37ac --- /dev/null +++ b/test/images/dnsutils/Dockerfile_windows @@ -0,0 +1,27 @@ +# Copyright 2019 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM BASEIMAGE + +USER ContainerAdministrator +ENV chocolateyUseWindowsCompression false +RUN powershell -Command \ + iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); \ + choco feature disable --name showDownloadProgress; \ + powershell -Command choco install bind-toolsonly --version 9.10.3 -y +RUN powershell -Command "\ + wget -uri 'https://github.com/coredns/coredns/releases/download/v1.5.0/coredns_1.5.0_windows_amd64.tgz' -OutFile 'C:\coredns.tgz';\ + tar -xzvf 'C:\coredns.tgz';\ + Remove-Item 'C:\coredns.tgz'" +ADD hostname /bin/hostname.exe diff --git a/test/images/dnsutils/VERSION b/test/images/dnsutils/VERSION index 9459d4ba2a0..5625e59da88 100644 --- a/test/images/dnsutils/VERSION +++ b/test/images/dnsutils/VERSION @@ -1 +1 @@ -1.1 +1.2 diff --git a/test/images/jessie-dnsutils/Dockerfile b/test/images/jessie-dnsutils/Dockerfile index 564b6962350..40e867fc279 100644 --- a/test/images/jessie-dnsutils/Dockerfile +++ b/test/images/jessie-dnsutils/Dockerfile @@ -26,3 +26,6 @@ RUN ["/fixup-apt-list.sh"] RUN apt-get -q update && \ apt-get install -y dnsutils && \ apt-get clean + +ADD https://github.com/coredns/coredns/releases/download/v1.5.0/coredns_1.5.0_linux_BASEARCH.tgz /coredns.tgz +RUN tar -xzvf /coredns.tgz && rm -f /coredns.tgz diff --git a/test/images/jessie-dnsutils/VERSION b/test/images/jessie-dnsutils/VERSION index d3827e75a5c..9459d4ba2a0 100644 --- a/test/images/jessie-dnsutils/VERSION +++ b/test/images/jessie-dnsutils/VERSION @@ -1 +1 @@ -1.0 +1.1