I am trying to run an Argo Workflow. But it gives me this error message:
Error (exit code 145)
My .Net Core 5.0 application is trying to receive a urlPath
as parameter and then processes the text input within that file and return it. Below is my YAML
file for reference purposes.
metadata:
generatename: read-data-
namespace: argo
spec:
entrypoint: read-data
templates:
- name: read-data
dag:
tasks:
- name: read-all-data
template: read-all-data
arguments:
parameters:
- name: fileUrl
value: 'https://dpaste.com/24593EK38'
- name: read-all-data
inputs:
parameters:
- name: fileUrl
container:
image: 'manankapoor2705/cli_readdata:latest'
command:
- dotnet
- /app/bin/Debug/net5.0/cli_readdata.dll
args:
- '--fileUrl={{inputs.parameters.fileUrl}}'
I am also attaching the Dockerfile for the image.
FROM mcr.microsoft.com/dotnet/runtime:5.0 AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["CLI_ReadData/CLI_ReadData.csproj", "CLI_ReadData/"]
RUN dotnet restore "CLI_ReadData/CLI_ReadData.csproj"
COPY . .
WORKDIR "/src/CLI_ReadData"
RUN dotnet build "CLI_ReadData.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "CLI_ReadData.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "CLI_ReadData.dll"]
On running the workflow I receive the error code 145 along with the following logs:
Could not execute because the application was not found or a compatible .NET SDK is not installed. Possible reasons for this include:
* You intended to execute a .NET program:
The application '/app/bin/Debug/net5.0/cli_readdata.dll' does not exist.
* You intended to execute a .NET SDK command: It was not possible to find any installed .NET SDKs. Install a .NET SDK from: https://aka.ms/dotnet-download
In the command section for read-all-data
template I tried 2 approaches but both didn't work out.
Approach 1 : Providing the absolute url of the CLI.ReadData.dll
file
command:
- dotnet
- /app/bin/Debug/net5.0/cli_readdata.dll
Approach 2 :
command:
- dotnet
- cli_readdata.dll
In both the conditions I am receiving the error. However when I run the below mentioned command within the docker container, it is working as expected, generating all the expected results.
dotnet /app/bin/Debug/net5.0/cli_readdata.dll --fileUrl="https://dpaste.com/24593EK38.txt"
So I just want to know, why isn't it working when running in a workflow ? Am I doing something wrong while passing the parameters, is there any error in the commands or anything needs to be changed with the Dockerfile ?