I haven't been able to run hello-world on command prompt but on quickstart terminal it works. Why is that? Error message on command prompt:
https://drive.google.com/file/d/0B0rw5s9roTIiWnpOM1JhVUNDZVU/view?usp=sharing
In a broader context, I am trying to run Docker compose to set up a network but unsuccessful. So I figure understanding more about Docker would be helpful. Appreciate any pointer. Thanks!
(Please copy paste the error directly in your post)
From the screenshot, you run this command from Windows system. Did you install docker for windows
in your windows system? To do this, you need check if your windows system is good enough to do that. Check Windows versions of Docker Engine, Compose, and Machine
If you installed Docker for Windows
, then you should be fine to docker run hello-world
directly.
Otherwise, you should choice to run with windows base image, lucky Docker company made this.
docker run run hello-world:nanoserver
You can compare the differences about hello-world:latest
and hello-world:nanoserver
Dockerfile for image hello-world:nanoserver
:
FROM microsoft/nanoserver
COPY hello.txt C:
CMD ["cmd", "/C", "type C:\\hello.txt"]
Dockerfile for image hello-world:latest
FROM scratch
COPY hello /
CMD ["/hello"]