title: adding .net core to docker container with Jenkins
body: <p>I'm trying to create a dockerfile that will build an image with .net core 2.0 and Jenkins.  I'm kind of new to Docker but want to include .net core 2.0 in my container with Jenkins so I don't have to worry about .net core being installed on the target machine and can build .net core apps with Jenkins in my container.  Am I missing something here? </p>
  
  <p>it builds fine up until it runs the apt-get update command and I get the following error:
  <code>
  E: Malformed entry 1 in list file /etc/apt/sources.list.d/dotnetdev.list (component)
  E: The list of sources could not be read.
  </code></p>
  
  <p>I'm using the steps to install on ubuntu at this link:
  <a href="https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x" rel="noreferrer">https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x</a></p>
  
  <p>My Dockerfile looks like this:
  <code><br>
  FROM jenkins
   # Install .NET Core SDK
  USER root
  RUN  mkdir -p /jenkins
  WORKDIR /jenkins</p>
  
  <p>ENV DOTNET_CORE_SDK_VERSION 2.0
  RUN   curl <a href="https://packages.microsoft.com/keys/microsoft.asc" rel="noreferrer">https://packages.microsoft.com/keys/microsoft.asc</a> | gpg --dearmor >/jenkins/microsoft.gpg
  RUN   mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
  RUN   sh -c 'echo "deb [arch=amd64] <a href="https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod" rel="noreferrer">https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod</a> xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
  RUN   apt-get update
  RUN   apt-get install dotnet-sdk-2.0.0
  </code></p>