I have followed the following guide: Running ASP.NET 5 applications in Linux Containers with Docker and I cannot get this to work on my Windows PC or Linux server. My dockerfile looks like this:
FROM microsoft/aspnet
COPY . /app
WORKDIR /app
RUN ["dnu", "restore"]
EXPOSE 5000/tcp
ENTRYPOINT ["dnx", "-p", "project.json", "web"]
I then ran docker build -t myapp .
and then docker run -d -p 80:5000 myapp
it says it is running but I cannot open the website in the browser. I know on Windows you are supposed to find the ip address that the actual virtual machine is running against by using docker-machine ip default
which ended up being 192.168.99.100
but when I navigated to http://192.168.99.100
I just get the generic "This webpage is not available" error message. I have also tried different variations of this docker run command, such as docker run -it -p 80:5000 myapp
, docker run -p 80:5000 myapp
, and I have also tried different ports, such as docker run -d -p 5000:5000 myapp
but nothing seems to work.
I have tried this both on my windows machine and on my linux server, but they both do not work.
I am able to run dnx web
without docker and everything works as expected.