title: how to deploy .net core web api to linux machine
body: <p>I created a web api application using .net core, and I want to deploy to linux using docker. How to do it ?</p>
  
  <p>I add this (--server.urls) inside project.json in "commands" section,
  so it becomes like this : </p>
  
  <pre><code>"commands": {
      "web": "Microsoft.AspNet.Server.Kestrel --server.urls http://0.0.0.0:5000",
    },
  </code></pre>
  
  <p>This is my dockerfile </p>
  
  <pre><code>FROM microsoft/aspnet:1.0.0-rc1-update1-coreclr
  
  COPY . /app
  
  WORKDIR /app
  
  RUN ["dnu", "restore"]
  
  EXPOSE 5000/tcp
  
  ENTRYPOINT ["dnx", "-p", "project.json", "web"]
  </code></pre>
  
  <p>I can successfully created a docker image, using this command
  docker build -t myapp .</p>
  
  <p>but when i run the docker </p>
  
  <p>docker run -d -t -p 80:5000 myapp, it threw an error</p>
  
  <pre><code>"Error response from daemon: driver failed programming external connectivity on endpoint kickass_hopper (16d5675978b188131670f391614f7f89b6ec977ae88924ae422a9a9c18768f22): iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 80 -j DNAT --to-destination 172.17.0.2:5000 ! -i docker0: iptables: No chain/target/match by that name.
   (exit status 1)."
  </code></pre>
  
  <p>Anybody know what happen ?</p>