Thursday, May 14, 2020

Example of dockerfile and how to bake in locally.

FROM mcr.microsoft.com/dotnet/core/sdk:3.1

Add bin/Debug/netcoreapp3.1/publish /var/foo/bin
WORKDIR /var/foo/bin

EXPOSE 5000/tcp
ENV ASPNETCORE_URLS http://*:5000

ENTRYPOINT ["dotnet", "Company.Project.dll"]

To bake in solution file folder run

dotnet publish

In *.csproj folder run

docker build -t testingdocker .
docker run -lt testingdocker --entrypoint bin/bash


Notice that there is a dot (.)

No comments: