<p>I have a .Net Core Console Application which I have containerized. The purpose of my application is to accept a file url and return the text. Below is my Dockerfile.</p>
<pre class="lang-sh prettyprint-override"><code>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 [&quot;CLI_ReadData/CLI_ReadData.csproj&quot;, &quot;CLI_ReadData/&quot;]
RUN dotnet restore &quot;CLI_ReadData/CLI_ReadData.csproj&quot;
COPY . .
WORKDIR &quot;/src/CLI_ReadData&quot;
RUN dotnet build &quot;CLI_ReadData.csproj&quot; -c Release -o /app/build

FROM build AS publish
RUN dotnet publish &quot;CLI_ReadData.csproj&quot; -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT [&quot;dotnet&quot;, &quot;CLI_ReadData.dll&quot;]
</code></pre>
<p>I now want to create an Argo Workflow for the same. Below is the corresponding .yaml file</p>
<pre class="lang-yaml prettyprint-override"><code>metadata:
  name: 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'
          - app/bin/Debug/net5.0/CLI_ReadData.dll
        args:
          - '--fileUrl={{inputs.parameters.fileUrl}}'  
  ttlStrategy:
    secondsAfterCompletion: 300

</code></pre>
<p>While creating the Argo Workflow I am getting the below error :</p>
<blockquote>
<p>task 'read-data.read-all-data' errored: container &quot;main&quot; in template
&quot;read-all-data&quot;, does not have the command specified: when using the
emissary executor you must either explicitly specify the command, or
list the image's command in the index:
<a href="https://argoproj.github.io/argo-workflows/workflow-executors/#emissary-emissary" rel="nofollow noreferrer">https://argoproj.github.io/argo-workflows/workflow-executors/#emissary-emissary</a></p>
</blockquote>
<p>I am also attaching my Program.cs file for reference purposes</p>
<pre class="lang-cs prettyprint-override"><code>class Program
    {
        public class CommandLineOptions
        {
            [Option(&quot;fileUrl&quot;, Required = true, HelpText = &quot;Please provide a url of the text file.&quot;)]
            public string fileUrl { get; set; }
        }

        static void Main(string[] args)
        {
            try
            {
                var result = Parser.Default.ParseArguments&lt;CommandLineOptions&gt;(args)
               .WithParsed&lt;CommandLineOptions&gt;(options =&gt;
               {

                   Console.WriteLine(&quot;Arguments received...Processing further !&quot;);

                   var text = readTextFromFile(options.fileUrl);
                   Console.WriteLine(&quot;Read names from textfile...&quot;);

                   var names = generateListOfNames(text);
               });
                if (result.Errors.Any())
                {
                    throw new Exception($&quot;Task Failed {String.Join('\n', result.Errors)}&quot;);
                }
                //exit successfully
                Environment.Exit(0);
            }
            catch (Exception ex)
            {
                Console.WriteLine(&quot;Task failed!!&quot;);
                Console.WriteLine(ex.ToString());
                //failed exit
                Environment.Exit(1);
            }

            Console.WriteLine(&quot;Hello World!&quot;);
        }

        public static string readTextFromFile(string path)
        {
            System.Net.WebRequest request = System.Net.WebRequest.Create(path);
            System.Net.WebResponse response = request.GetResponse();
            Stream dataStream = response.GetResponseStream();

            var reader = new StreamReader(dataStream);
            var text = reader.ReadToEnd();

            reader.Close();
            response.Close();

            return text;
        }

        public static List&lt;string&gt; generateListOfNames(string text)
        {
            var names = text.Split(',').ToList&lt;string&gt;();

            foreach (var name in names)
                Console.WriteLine(name);

            return names;
        }
    }
</code></pre>
<p>Can anyone please help me out ?</p>

<p>The <code>read-all-data</code> template looks to me like invalid YAML. I think you're missing the <code>command</code> field name. I think the path also needs either a leading <code>/</code> (for an absolute path), or to start with <code>bin/</code> (for a relative path with <code>/app</code> as the working directory).</p>
<pre class="lang-yaml prettyprint-override"><code>    - name: read-all-data
      inputs:
        parameters:
          - name: fileUrl
      container:
        image: 'manankapoor2705/cli_readdata:latest'
        command:
          - /app/bin/Debug/net5.0/CLI_ReadData.dll
        args:
          - '--fileUrl={{inputs.parameters.fileUrl}}'  
</code></pre>
