title: docker file arg variable not passed for asp.net core on linux
body: <p>I have an Asp.Net core 3.1 app which is dockerized for linux  like this</p>
  <pre><code>FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base 
  ARG BUILD_CONFIGURATION=Release
  ENV ASPNETCORE_ENVIRONMENT=Production
  ENV DOTNET_USE_POLLING_FILE_WATCHER=true
  WORKDIR /app
  EXPOSE 80
  EXPOSE 443
  FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
  WORKDIR /src
  COPY . .
  RUN dotnet restore &quot;Api/Authentication/Authentication.csproj&quot;
  COPY . .
  WORKDIR &quot;/src/Api/Authentication&quot;
  RUN dotnet build &quot;Authentication.csproj&quot; -c $BUILD_CONFIGURATION -o /app/build
  FROM build AS publish
  RUN dotnet publish &quot;Authentication.csproj&quot; -c $BUILD_CONFIGURATION -o /app/publish
  FROM base AS final
  WORKDIR /app
  COPY --from=publish /app/publish .
  ENTRYPOINT [&quot;dotnet&quot;, &quot;Authentication.dll&quot;]
  </code></pre>
  <p>In the Azure Devops pipeline the build tempelate looks like this.
  <a href="https://i.stack.imgur.com/uoETX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uoETX.png" alt="enter image description here" /></a></p>
  <p>But the build fails with the following message</p>
  <blockquote>
  <p>##[error]The command '/bin/sh -c dotnet build &quot;Authentication.csproj&quot; -c $BUILD_CONFIGURATION -o /app/build' returned a non-zero code: 1</p>
  </blockquote>
  <p>The Arg BUILD_CONFIGURATION seems is not accepting the value from the devops piplline</p>