I’m new here, sorry if I posted this in the wrong spot.
I recently created my first Docker containtered project in Visual Studio. But I want to set the network flag to host because I want my project to connect to my Mysql server which is running on my host machine.
How do I do this?
Visual Studio generates a dockerfile with this content:
FROM mcr.microsoft.com/dotnet/core/aspnet:2.1-stretch-slim AS base
FROM mcr.microsoft.com/dotnet/core/sdk:2.1-stretch AS build
COPY [“PaymentSystem/PaymentSystem.csproj”, “PaymentSystem/”]
RUN dotnet restore “PaymentSystem/PaymentSystem.csproj”
COPY . .
RUN dotnet build “PaymentSystem.csproj” -c Release -o /app
FROM build AS publish
RUN dotnet publish “PaymentSystem.csproj” -c Release -o /app
FROM base AS final
COPY --from=publish /app .
ENTRYPOINT [“dotnet”, “PaymentSystem.dll”]
Should I put it somewhere in here?
Thanks for any help!