diff --git a/src/Dockerfile b/src/Dockerfile new file mode 100644 index 0000000..1a5a49a --- /dev/null +++ b/src/Dockerfile @@ -0,0 +1,17 @@ +FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build +WORKDIR /mpj +COPY ./MyPrayerJournal/MyPrayerJournal.fsproj ./ +RUN dotnet restore + +COPY ./MyPrayerJournal ./ +RUN dotnet publish -c Release -r linux-x64 +RUN rm bin/Release/net7.0/linux-x64/publish/appsettings.*.json + +FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine as final +WORKDIR /app +RUN apk add --no-cache icu-libs +ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false +COPY --from=build /mpj/bin/Release/net7.0/linux-x64/publish/ ./ + +EXPOSE 80 +CMD [ "dotnet", "/app/MyPrayerJournal.dll" ] \ No newline at end of file diff --git a/src/MyPrayerJournal/MyPrayerJournal.fsproj b/src/MyPrayerJournal/MyPrayerJournal.fsproj index 0d59d24..db55a4a 100644 --- a/src/MyPrayerJournal/MyPrayerJournal.fsproj +++ b/src/MyPrayerJournal/MyPrayerJournal.fsproj @@ -4,6 +4,8 @@ 3.3 embedded false + false + false