43 lines
1.6 KiB
Plaintext
43 lines
1.6 KiB
Plaintext
# Copyright 2020 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.
|
|
|
|
ARG BASEIMAGE
|
|
ARG REGISTRY
|
|
|
|
# We're using a Linux image to unpack the archive, then we're copying it over to Windows.
|
|
FROM --platform=linux/amd64 alpine:3.6 as prep
|
|
|
|
ADD https://openresty.org/download/openresty-1.13.6.2-win64.zip /openresty-win64.zip
|
|
ADD http://wiki.overbyte.eu/arch/openssl-1.1.1i-win64.zip /openssl.zip
|
|
RUN mkdir /openresty &&\
|
|
unzip /openresty-win64.zip -d /openresty &&\
|
|
mkdir /openssl &&\
|
|
unzip /openssl.zip -d /openssl
|
|
|
|
FROM $BASEIMAGE
|
|
|
|
COPY --from=prep /openresty/openresty-1.13.6.2-win64 /openresty
|
|
COPY --from=prep /openssl /openssl
|
|
|
|
ADD ["https://raw.githubusercontent.com/openssl/openssl/OpenSSL_1_1_1i/apps/openssl.cnf", "/Program Files/Common Files/SSL/openssl.cnf"]
|
|
|
|
ENV PATH="C:\openssl\;C:\openresty\;C:\bin\;C:\curl\;C:\Windows\system32;C:\Windows;C:\Program Files\PowerShell;"
|
|
|
|
ADD run.sh /openresty/run.sh
|
|
ADD nginx.conf /openresty/conf/nginx.conf
|
|
ADD template.lua /openresty/lua/template.lua
|
|
|
|
EXPOSE 80 443 8080 8443
|
|
ENTRYPOINT ["/bin/sh", "-c", " cd /openresty && ./run.sh"]
|