Unable to find image 'xxxx' locally

user1108948 picture user1108948 · Apr 13, 2016 · Viewed 55.3k times · Source

Basically I created an asp.net mvc project. I added a Dockerfile in the project folder.

FROM microsoft/aspnet:1.0.0-rc1-update1
ADD . /app
WORKDIR /app/approot
EXPOSE 5004
ENTRYPOINT ["./web"]

Now I open Docker Quickstart Terminal on my Windows desktop. Running the command

docker build -t hellodocker:0.1.0 .

See the result docker

However I can't find the image when I run it. find

So what is wrong?

EDIT

Thanks for the comment, I correct the typo. But there is an another error. typo

EDIT-1

If I change the ENTRYPOINT as ENTRYPOINT ["dnx", "-p", "project.json", "web"]

Then I get another error: Unable to reslolve project from /app/approot

EDIT-2

The context in the directory is as: directory

Answer

Andy Shinn picture Andy Shinn · Apr 13, 2016

Your project is being added to the image as /app. So, in the container, the project.json lives at /app/project.json. But your WORKDIR is set to /app/approot.

This effectively makes your ENTRYPOINT looking for project.json at /app/approot, which it does not exist. You'll either need to change WORKDIR to /app or COPY . /app/approot.