DEV Community

Discussion on: Use Container for Azure Batch Service

Collapse
 
karthik1036 profile image
karthik1036 • Edited

I have .net core Console Application which prints a basic hello world message I have published my application to azure container registry
my Docker File
FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["ConsoleApp1.csproj", ""]
RUN dotnet restore "./ConsoleApp1.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "ConsoleApp1.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "ConsoleApp1.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "ConsoleApp1.dll"]\

I have created a node please go through this image for better understanding node-configuration1 ,node-configuration,node-config,task-config(please see in the stack overflow url)

I am using a Linux ((ubuntu container)container for integrating with azure batch but whenever I run My task its saying to install
It was not possible to find any installed .NET Core SDKs Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from: aka.ms/dotnet-download

Task_issue

how to install dotnet core in linux container please guide me on this through sharing some
resource

please see the images in the stack overflow:stackoverflow.com/questions/658841...

Collapse
 
kenakamu profile image
Kenichiro Nakamura

Sorry to get back to you late. First thing first, if you docker build the Dockerfile in your local computer and run the docker image, does it all work fine?