I recently deployed my first ASP.NET Core application using Visual Studio for Mac inside a Docker container on Linux. However, I'm facing an issue where the CSS is not being applied and the JavaScript is not functioning as expected.
It seems like the app is having trouble locating the wwwroot folder. Any suggestions on how to fix this?
Any assistance or advice would be greatly appreciated!
Here is the content of my Dockerfile:
FROM microsoft/aspnetcore:2.0 AS base
WORKDIR /app
EXPOSE 80
FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src
COPY ./MyWealth.csproj MyWealth/
RUN dotnet restore MyWealth/MyWealth.csproj
WORKDIR /src/MyWealth
COPY . .
RUN dotnet build MyWealth.csproj -c Release -o /app
FROM build AS publish
RUN dotnet publish MyWealth.csproj -c Release -o /app
RUN cp ./MyWealth.sqlite /app/MyWealth.sqlite
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "MyWealth.dll"]