-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.Alpine
38 lines (29 loc) · 1.06 KB
/
Dockerfile.Alpine
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
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
# Install dependencies
RUN apk update && apk upgrade
RUN apk add icu-libs icu-data-full fontconfig
# (Optional step) Install the ttf-mscorefonts-installer package
# to use Microsoft TrueType core fonts in the application
RUN apk add ttf-dejavu && \
apk add msttcorefonts-installer && \
apk add ttf-dejavu && \
update-ms-fonts && \
fc-cache -f
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
WORKDIR /src
# 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 .
# Define the entry point for the application
ENTRYPOINT ["dotnet", "DocumentConversionWebApi.dll"]