forked from radzenhq/radzen-blazor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (23 loc) · 905 Bytes
/
Dockerfile
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
29
30
# syntax=docker/dockerfile:1
FROM mono:latest
ENV DOCFX_VER 2.58.4
RUN apt-get update && apt-get install unzip wget git -y && wget -q -P /tmp https://github.com/dotnet/docfx/releases/download/v${DOCFX_VER}/docfx.zip && \
mkdir -p /opt/docfx && \
unzip /tmp/docfx.zip -d /opt/docfx && \
echo '#!/bin/bash\nmono /opt/docfx/docfx.exe $@' > /usr/bin/docfx && \
chmod +x /usr/bin/docfx && \
rm -rf /tmp/*
COPY Radzen.Blazor /app/Radzen.Blazor
COPY Radzen.DocFX /app/DocFX
COPY RadzenBlazorDemos /app/RadzenBlazorDemos
WORKDIR /app
RUN docfx DocFX/docfx.json
FROM mcr.microsoft.com/dotnet/sdk:6.0-focal
COPY --from=0 /app/RadzenBlazorDemos /app
WORKDIR /app
RUN dotnet publish -c Release -o out
COPY RadzenBlazorDemos/northwind.db /app/out
COPY RadzenBlazorDemos/northwind.sql /app/out
ENV ASPNETCORE_URLS http://*:5000
WORKDIR /app/out
ENTRYPOINT ["dotnet", "RadzenBlazorDemos.dll"]