Docker and .NET — part 2

var randomGen = new Random();
var guessThis = randomGen.NextInt64(9).ToString();
var input = string.Empty;do
{
System.Console.WriteLine("Enter your guess");
input = Console.ReadLine();
if(input!=null && input.Equals(guessThis))
{
System.Console.WriteLine("Right answer ! 🎊 Go again 👍");
guessThis = randomGen.NextInt64(9).ToString();
}
else
{
System.Console.WriteLine("Wrong!. ☹️");
}
}
while(!string.Equals(input,"exit", StringComparison.InvariantCultureIgnoreCase));
FROM mcr.microsoft.com/dotnet/runtime:6.0
FROM mcr.microsoft.com/dotnet/runtime:6.0
WORKDIR /container-app
FROM mcr.microsoft.com/dotnet/runtime:6.0
WORKDIR /container-app
COPY ["/app","/container-app"]
docker build -t dotnet-docker/tester:latest .
docker images
docker run -it --rm dotnet-docker/tester:latest
dotnet guess.dll

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store