-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.OpenSuse
55 lines (44 loc) · 1.86 KB
/
Dockerfile.OpenSuse
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM opensuse/leap AS base
RUN zypper -n install wget libicu && \
wget https://packages.microsoft.com/keys/microsoft.asc
RUN rpm --import microsoft.asc
RUN wget https://packages.microsoft.com/config/opensuse/15/prod.repo && \
mv prod.repo /etc/zypp/repos.d/microsoft-prod.repo && \
chown root:root /etc/zypp/repos.d/microsoft-prod.repo
RUN zypper -n install aspnetcore-runtime-7.0
#Install dependencies
RUN zypper -n install glibc-devel fontconfig
#Install fonts
RUN zypper -n install fetchmsttfonts
WORKDIR /app
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
ENV ASPNETCORE_URLS=http://+:80
EXPOSE 80
EXPOSE 443
FROM node:18 as build-frontend
WORKDIR /modules
COPY ["package.json", "./"]
RUN npm install
FROM opensuse/leap AS build
RUN zypper -n install wget libicu && \
wget https://packages.microsoft.com/keys/microsoft.asc
RUN rpm --import microsoft.asc
RUN wget https://packages.microsoft.com/config/opensuse/15/prod.repo && \
mv prod.repo /etc/zypp/repos.d/microsoft-prod.repo && \
chown root:root /etc/zypp/repos.d/microsoft-prod.repo
RUN zypper -n install dotnet-sdk-7.0
WORKDIR /src
RUN --mount=type=secret,id=dxnuget,required=true dotnet nuget add source $(cat /run/secrets/dxnuget) -n devexpress-nuget
COPY ["ReportingWebApp.csproj", "ReportingWebApp/"]
RUN dotnet restore "ReportingWebApp/ReportingWebApp.csproj"
COPY ["./", "ReportingWebApp/"]
WORKDIR "/src/ReportingWebApp"
COPY --from=build-frontend ./modules .
RUN dotnet build "ReportingWebApp.csproj" -c Release
FROM build AS publish
RUN dotnet publish "ReportingWebApp.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "ReportingWebApp.dll"]