0

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!

4

2 回答 2

0

(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"]
于 2017-06-22T05:03:18.460 回答
0

Docker is not supported natively on Windows7. It run in virtual box 'boot2docker' which provides it a linux environmental. The quickstart terminal is a special bash environment instead of the standard Windows command prompt, so you can't run docker commands on Windows command prompt.

Pointer-> https://docs.docker.com/toolbox/toolbox_install_windows/#what-you-get-and-how-it-works

However Docker is natively supported on Windows 10.

于 2017-06-22T05:36:55.157 回答