k8s.io/kubernetes@v1.29.3/test/images/agnhost/Dockerfile (about) 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 15 ARG BASEIMAGE 16 FROM $BASEIMAGE 17 18 CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/ 19 20 # from dnsutils image 21 # install necessary packages: 22 # - bind-tools: contains dig, which can used in DNS tests. 23 # - CoreDNS: used in some DNS tests. 24 # from hostexec image 25 # install necessary packages: 26 # - curl, nc: used by a lot of e2e tests 27 # - iproute2: includes ss used in NodePort tests 28 # from iperf image 29 # install necessary packages: iperf, bash 30 RUN apk --update add bind-tools curl netcat-openbsd iproute2 iperf bash && rm -rf /var/cache/apk/* \ 31 && ln -s /usr/bin/iperf /usr/local/bin/iperf \ 32 && ls -altrh /usr/local/bin/iperf 33 34 ADD https://github.com/coredns/coredns/releases/download/v1.6.2/coredns_1.6.2_linux_BASEARCH.tgz /coredns.tgz 35 RUN tar -xzvf /coredns.tgz && rm -f /coredns.tgz 36 37 # PORT 80 needed by: test-webserver 38 # PORT 8080 needed by: netexec, nettest, resource-consumer, resource-consumer-controller 39 # PORT 8081 needed by: netexec 40 # PORT 9376 needed by: serve-hostname 41 # PORT 5000 needed by: grpc-health-checking 42 EXPOSE 80 8080 8081 9376 5000 43 44 # from netexec 45 RUN mkdir /uploads 46 47 # from porter 48 ADD porter/localhost.crt localhost.crt 49 ADD porter/localhost.key localhost.key 50 51 ADD agnhost agnhost 52 53 # needed for the entrypoint-tester related tests. Some of the entrypoint-tester related tests 54 # overrides this image's entrypoint with agnhost-2 binary, and will verify that the correct 55 # entrypoint is used by the containers. 56 RUN ln -s agnhost agnhost-2 57 58 # this user and group is used in a E2E test case of 59 # SupplementalGroups with pre-defined group in the image 60 # - user-defined-in-image(uid=1000) 61 # - user-defined-in-image belongs to group-defined-in-image(gid=50000) 62 RUN adduser -u 1000 -D user-defined-in-image && \ 63 addgroup -g 50000 group-defined-in-image && \ 64 addgroup user-defined-in-image group-defined-in-image 65 66 ENTRYPOINT ["/agnhost"] 67 CMD ["pause"]