Files
rmutr_report/Dockerfile.dev
kamonwan taengsuk 9b94f9cf91 fixed
2023-04-05 15:03:22 +07:00

24 lines
1.1 KiB
Docker

FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as build-env
WORKDIR /source
COPY Packages/. Packages/.
COPY . .
RUN dotnet restore -s /source/Packages -s https://api.nuget.org/v3/index.json
RUN dotnet build
RUN dotnet publish -o /publish --configuration Release;
FROM mcr.microsoft.com/dotnet/aspnet:3.1
COPY . .
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y fontconfig
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated libc6-dev
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated libgdiplus
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated libx11-dev
RUN DEBIAN_FRONTEND=noninteractive rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/local/share/fonts/fonts/sarabun
COPY Fonts/* /usr/local/share/fonts/sarabun/
RUN chmod 644 /usr/local/share/fonts/sarabun/*
RUN fc-cache -fv
WORKDIR /app
COPY --from=build-env /publish .
ENV ASPNETCORE_URLS http://*:8080
ENTRYPOINT ["dotnet", "rmutr-report.dll"]