mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
test images: Fixes Windows httpd images
A 32-bit php was included in the images, instead of the 64-bit one. The base image is nanoserver-based, which does not support 32-bit apps. Because of this, httpd fails to start. Additionally, we've previously removed the busybox-helper dependency, but was left in in the httpd images. This removes the dependency from the httpd images.
This commit is contained in:
parent
bc2c4d8e9f
commit
030b6cc84c
@ -19,27 +19,27 @@ ARG REGISTRY
|
|||||||
FROM --platform=linux/amd64 alpine:3.6 as prep
|
FROM --platform=linux/amd64 alpine:3.6 as prep
|
||||||
|
|
||||||
ADD https://home.apache.org/~steffenal/VC15/binaries/httpd-2.4.46-win64-VC15.zip /httpd.zip
|
ADD https://home.apache.org/~steffenal/VC15/binaries/httpd-2.4.46-win64-VC15.zip /httpd.zip
|
||||||
ADD https://windows.php.net/downloads/releases/archives/php-7.4.14-Win32-vc15-x86.zip /php.zip
|
ADD https://windows.php.net/downloads/releases/archives/php-7.4.14-Win32-vc15-x64.zip /php.zip
|
||||||
|
ADD https://windows.php.net/downloads/nano/crt/crt-vc15-x64.zip /crt-vc15-x64.zip
|
||||||
|
|
||||||
RUN unzip /httpd.zip &&\
|
RUN unzip /httpd.zip &&\
|
||||||
mv ReadMe.txt /Apache24/DistributionReadMe.txt &&\
|
mv ReadMe.txt /Apache24/DistributionReadMe.txt &&\
|
||||||
mkdir /php &&\
|
mkdir /php &&\
|
||||||
unzip /php.zip -d /php/
|
unzip /php.zip -d /php/ &&\
|
||||||
|
unzip /crt-vc15-x64.zip -d /
|
||||||
|
|
||||||
FROM e2eteam/busybox-helper:1.29.0 as busybox-helper
|
|
||||||
FROM $BASEIMAGE
|
FROM $BASEIMAGE
|
||||||
|
|
||||||
# NOTE(claudiub): httpd requires vcruntime140.dll, which is already included in the
|
|
||||||
# busybox-helper image (it is also needed by dig).
|
|
||||||
COPY --from=busybox-helper /dig/vcruntime140.dll /Windows/System32/
|
|
||||||
COPY --from=prep /Apache24 /usr/local/apache2
|
COPY --from=prep /Apache24 /usr/local/apache2
|
||||||
COPY --from=prep /php /tools/php74
|
COPY --from=prep /php /tools/php74
|
||||||
|
COPY --from=prep /vcruntime140.dll /Windows/System32/
|
||||||
|
COPY --from=prep /msvcp140.dll /Windows/System32/
|
||||||
|
|
||||||
COPY httpd.conf /usr/local/apache2/conf/httpd.conf
|
COPY httpd.conf /usr/local/apache2/conf/httpd.conf
|
||||||
COPY index.html /usr/local/apache2/htdocs/index.html
|
COPY index.html /usr/local/apache2/htdocs/index.html
|
||||||
|
|
||||||
# NOTE(claudiub): docker buildx sets the PATH env variable to a Linux-like PATH, which is not desirable.
|
# NOTE(claudiub): docker buildx sets the PATH env variable to a Linux-like PATH, which is not desirable.
|
||||||
ENV PATH="C:\bin;C:\curl;C:\Windows\System32;C:\Windows;C:\Program Files\PowerShell;C:\tools\php74\;C:\usr\local\apache2\bin\;"
|
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\;"
|
||||||
|
|
||||||
USER ContainerAdministrator
|
USER ContainerAdministrator
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
@ -1 +1 @@
|
|||||||
2.4.39-alpine
|
2.4.39-1
|
||||||
|
@ -19,27 +19,27 @@ ARG REGISTRY
|
|||||||
FROM --platform=linux/amd64 alpine:3.6 as prep
|
FROM --platform=linux/amd64 alpine:3.6 as prep
|
||||||
|
|
||||||
ADD https://home.apache.org/~steffenal/VC14/binaries/httpd-2.4.41-win64-VC14.zip /httpd.zip
|
ADD https://home.apache.org/~steffenal/VC14/binaries/httpd-2.4.41-win64-VC14.zip /httpd.zip
|
||||||
ADD https://windows.php.net/downloads/releases/archives/php-7.4.14-Win32-vc15-x86.zip /php.zip
|
ADD https://windows.php.net/downloads/releases/archives/php-7.4.14-Win32-vc15-x64.zip /php.zip
|
||||||
|
ADD https://windows.php.net/downloads/nano/crt/crt-vc15-x64.zip /crt-vc15-x64.zip
|
||||||
|
|
||||||
RUN unzip /httpd.zip &&\
|
RUN unzip /httpd.zip &&\
|
||||||
mv ReadMe.txt /Apache24/DistributionReadMe.txt &&\
|
mv ReadMe.txt /Apache24/DistributionReadMe.txt &&\
|
||||||
mkdir /php &&\
|
mkdir /php &&\
|
||||||
unzip /php.zip -d /php/
|
unzip /php.zip -d /php/ &&\
|
||||||
|
unzip /crt-vc15-x64.zip -d /
|
||||||
|
|
||||||
FROM e2eteam/busybox-helper:1.29.0 as busybox-helper
|
|
||||||
FROM $BASEIMAGE
|
FROM $BASEIMAGE
|
||||||
|
|
||||||
# NOTE(claudiub): httpd requires vcruntime140.dll, which is already included in the
|
|
||||||
# busybox-helper image (it is also needed by dig).
|
|
||||||
COPY --from=busybox-helper /dig/vcruntime140.dll /Windows/System32/
|
|
||||||
COPY --from=prep /Apache24 /usr/local/apache2
|
COPY --from=prep /Apache24 /usr/local/apache2
|
||||||
COPY --from=prep /php /tools/php74
|
COPY --from=prep /php /tools/php74
|
||||||
|
COPY --from=prep /vcruntime140.dll /Windows/System32/
|
||||||
|
COPY --from=prep /msvcp140.dll /Windows/System32/
|
||||||
|
|
||||||
COPY httpd.conf /usr/local/apache2/conf/httpd.conf
|
COPY httpd.conf /usr/local/apache2/conf/httpd.conf
|
||||||
COPY index.html /usr/local/apache2/htdocs/index.html
|
COPY index.html /usr/local/apache2/htdocs/index.html
|
||||||
|
|
||||||
# NOTE(claudiub): docker buildx sets the PATH env variable to a Linux-like PATH, which is not desirable.
|
# NOTE(claudiub): docker buildx sets the PATH env variable to a Linux-like PATH, which is not desirable.
|
||||||
ENV PATH="C:\bin;C:\curl;C:\Windows\System32;C:\Windows;C:\Program Files\PowerShell;C:\tools\php74\;C:\usr\local\apache2\bin\;"
|
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\;"
|
||||||
|
|
||||||
USER ContainerAdministrator
|
USER ContainerAdministrator
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
@ -1 +1 @@
|
|||||||
2.4.38-alpine
|
2.4.38-1
|
||||||
|
Loading…
Reference in New Issue
Block a user