k8s.io/kubernetes@v1.29.3/test/images/httpd/Dockerfile_windows (about)

     1  # Copyright 2021 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  ARG REGISTRY
    17  
    18  # We're using a Linux image to unpack the archive, then we're copying it over to Windows.
    19  FROM --platform=linux/amd64 alpine:3.6 as prep
    20  
    21  ADD https://home.apache.org/~steffenal/VC14/binaries/httpd-2.4.41-win64-VC14.zip /httpd.zip
    22  ADD https://windows.php.net/downloads/releases/archives/php-7.4.14-Win32-vc15-x64.zip /php.zip
    23  ADD https://windows.php.net/downloads/nano/crt/crt-vc15-x64.zip /crt-vc15-x64.zip
    24  
    25  RUN unzip /httpd.zip &&\
    26      mv ReadMe.txt /Apache24/DistributionReadMe.txt &&\
    27      mkdir /php &&\
    28      unzip /php.zip -d /php/ &&\
    29      unzip /crt-vc15-x64.zip -d /
    30  
    31  FROM $BASEIMAGE
    32  
    33  COPY --from=prep /Apache24 /usr/local/apache2
    34  COPY --from=prep /php /tools/php74
    35  COPY --from=prep /vcruntime140.dll /Windows/System32/
    36  COPY --from=prep /msvcp140.dll /Windows/System32/
    37  
    38  COPY httpd.conf /usr/local/apache2/conf/httpd.conf
    39  COPY index.html /usr/local/apache2/htdocs/index.html
    40  
    41  # NOTE(claudiub): docker buildx sets the PATH env variable to a Linux-like PATH, which is not desirable.
    42  ENV PATH="C:\dig;C:\bin;C:\curl;C:\Windows\System32;C:\Windows;C:\Program Files\PowerShell;C:\tools\php74\;C:\usr\local\apache2\bin\;"
    43  
    44  USER ContainerAdministrator
    45  EXPOSE 80
    46  ENTRYPOINT ["C:/usr/local/apache2/bin/httpd.exe"]