publish a web api based on core RC2 on docker

I’m trying to publish a web api on docker based on docker.

I’m using a docker file with the following content :

  • `initialize': the scheme postgres does not accept registry part: postgres:@ (or bad hostname?) (URI::InvalidURIError) with Docker
  • Docker service registering into Consul but health check is failing
  • How to persist initial db in a docker container
  • Why does pushing a Docker image fail with “dial tcp: lookup on read udp i/o timeout”?
  • docker service update vs docker stack deploy with existing stack
  • Windows Docker Toolbox won't start
  • FROM microsoft/dotnet
    COPY . /dotnetapp
    WORKDIR /dotnetapp
    RUN dotnet restore
    EXPOSE 5000
    ENTRYPOINT dotnet run

    I can build and run the image but i’m not able to acces to web api.

  • How to create mysql volume which exists even if i remove the docker container
  • Kubernetes: creating pod with specific environments
  • How to connect Docker from another host?
  • Bash script behaves differently from Docker run command instead of inside container itself?
  • Data Container In Docker : Data Not Populated
  • Connect to a docker host that is managed by dockercloud-agent
  • One Solution collect form web for “publish a web api based on core RC2 on docker”

    Seems like you have to specify which URL Kestrel will listen to otherwise it won’t accept any connection outside same container.

    So your ENTRYPOINT should be something like

    ENTRYPOINT ["dotnet", "run", "--server.urls="]

    Including the –server.urls argument is vital to allow inbound connections from outside container. If not, Kestrel will reject any connection that is not coming from the container, something not really useful…


    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.