title: VSTS docker task failed on '&&' token in docker RUN command
body: <p>I configuring CI for my ASP.NET Core application in VSTS (visual studio online).
  I've added "docker-compose build" task to build definition but it fails with errors:</p>
  
  <pre>
  
      Step 4/9 : RUN dotnet restore QuizService.sln && dotnet publish QuizService.sln -c Release -o obj/Docker/publish
      ---> Running in 7ea0cf1881d1
      ... rence = 'SilentlyContinue'; dotnet restore QuizService.sln && dotnet  ...
      The token '&&' is not a valid statement separator in this version.
      + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
      + FullyQualifiedErrorId : InvalidEndOfLine
      Service 'quizservice' failed to build: The command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; dotnet restore QuizService.sln && dotnet publish QuizService.sln -c Release -o obj/Docker/publish' returned a non-zero code: 1
      ##[error]Building quizservice
      ##[error]Service 'quizservice' failed to build: The command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; dotnet restore QuizService.sln && dotnet publish QuizService.sln -c Release -o obj/Docker/publish' returned a non-zero code: 1
      ##[error]C:\ProgramData\Chocolatey\bin\docker-compose.exe failed with return code: 1
  
  </pre>
  
  <p>The problem is with my dockerfile on line:</p>
  
  <pre>
  RUN dotnet restore QuizService.sln && dotnet publish QuizService.sln -c Release -o obj/Docker/publish
  </pre>
  
  <p>Somehow docker does not understand '&amp;&amp;' operator: 
  <em>The token '&amp;&amp;' is not a valid statement separator</em>. The exception itself seems to be related to powershell rather than to docker. Poweshell has no '&amp;&amp;' syntax but why it starts using powershell for RUN command here instead of cmd.exe?</p>
  
  <p>It works like a charm when I build locally on my dev machine.</p>
  
  <p>Do somebody faced the same problem?</p>