Simple docker file
FROM mcr.microsoft.com/dotnet/core/runtime:2.1 AS base
WORKDIR /app
EXPOSE 5000
COPY . .
ENTRYPOINT ["dotnet", "BBK.Web.Host.dll"]
- get .net run time for .net core 2.1
- on docker container go app folder
- expose 5000 on docker container.
- copy local/current folder to docker/app
- run cmd command
Connect localhost services from docker
appsetting.json
Server=host.docker.internal; Port=3306; Database=bbkhf; Uid=root; Pwd=dsfdsdfsdf$;"
--------------------------------------------------------------------
No comments:
Post a Comment