Dockerfile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 2019 The Kubernetes Authors.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. FROM BASEIMAGE
  15. CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
  16. # from dnsutils image
  17. # install necessary packages:
  18. # - bind-tools: contains dig, which can used in DNS tests.
  19. # - CoreDNS: used in some DNS tests.
  20. # from hostexec image
  21. # install necessary packages:
  22. # - curl, nc: used by a lot of e2e tests
  23. # - iproute2: includes ss used in NodePort tests
  24. # from iperf image
  25. # install necessary packages: iperf, bash
  26. RUN apk --update add bind-tools curl netcat-openbsd iproute2 iperf bash && rm -rf /var/cache/apk/* \
  27. && ln -s /usr/bin/iperf /usr/local/bin/iperf \
  28. && ls -altrh /usr/local/bin/iperf
  29. ADD https://github.com/coredns/coredns/releases/download/v1.6.2/coredns_1.6.2_linux_BASEARCH.tgz /coredns.tgz
  30. RUN tar -xzvf /coredns.tgz && rm -f /coredns.tgz
  31. # PORT 80 needed by: test-webserver
  32. # PORT 8080 needed by: netexec, nettest, resource-consumer, resource-consumer-controller
  33. # PORT 8081 needed by: netexec
  34. # PORT 9376 needed by: serve-hostname
  35. EXPOSE 80 8080 8081 9376
  36. # from netexec
  37. RUN mkdir /uploads
  38. # from porter
  39. ADD porter/localhost.crt localhost.crt
  40. ADD porter/localhost.key localhost.key
  41. ADD agnhost agnhost
  42. # needed for the entrypoint-tester related tests. Some of the entrypoint-tester related tests
  43. # overrides this image's entrypoint with agnhost-2 binary, and will verify that the correct
  44. # entrypoint is used by the containers.
  45. RUN ln -s agnhost agnhost-2
  46. ENTRYPOINT ["/agnhost"]
  47. CMD ["pause"]