-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.OpenSuse
49 lines (37 loc) · 1.5 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
# Build runtime image
FROM opensuse/leap AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
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-8.0
# Install dependencies
RUN zypper -n install glibc-devel fontconfig
# Install fonts
RUN zypper -n install fetchmsttfonts
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-8.0
# Copy project files and build the application
COPY . ./
# Specify your DevExpress NuGet Feed URL as the package source
RUN --mount=type=secret,id=dxnuget dotnet nuget add source $(cat /run/secrets/dxnuget) -n devexpress-nuget
# Publish a release
RUN dotnet publish "DocumentConversionWebApi.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=build /app/publish .
ENV ASPNETCORE_URLS=http://+:80
# Define the entry point for the application
ENTRYPOINT ["dotnet", "DocumentConversionWebApi.dll"]