-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.nginx
28 lines (17 loc) · 1012 Bytes
/
Dockerfile.nginx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM docker.io/library/alpine:3.18 as template-builder
ARG RUNTIME_IDENTIFIER=linux-musl-x64
RUN apk add bash curl icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib clang build-base zlib-dev
ENV DOTNET_ROOT /dotnet
ENV PATH "/dotnet:$PATH"
ENV DOTNET_NOLOGO true
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash -s -- --channel 8.0 --quality preview --install-dir /dotnet/
COPY ./src/Tools/NginxTemplateCustomizer/ /NginxTemplateCustomizer/
RUN dotnet restore /NginxTemplateCustomizer/; \
dotnet publish /NginxTemplateCustomizer/ --configuration "Release" --self-contained --runtime "${RUNTIME_IDENTIFIER}" --output /NginxTemplateCustomizer/out
FROM docker.io/library/alpine:3.18 as host
ENV SERVER_PORT 80
ENV PROXY_PASS_URI http://localhost:5000
RUN apk add brotli nginx nginx-mod-http-brotli bash
COPY --from=template-builder /NginxTemplateCustomizer/out/nginxcustomizer /tmp/nginxcustomizer
COPY ./nginx/nginx.conf /etc/nginx/http.d/default.conf
CMD ["/tmp/nginxcustomizer"]