sudo docker run hello-world
执行上面的出错了,错误如下
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/hello\": stat /hello: no such file or directory": unknown.
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/hello\": stat /hello: no such file or directory": unknown.
执行如下的确成功了:
docker run ubuntu:16.04 /bin/echo "Hello World"
Unable to find image 'ubuntu:16.04' locally
16.04: Pulling from library/ubuntu
3620e2d282dc: Pull complete
ef22f5e4b3b2: Pull complete
99f229f854da: Pull complete
4fe433abe16a: Pull complete
c9b72a16d85e: Pull complete
Digest: sha256:14066a391d902c386d6164d44ade3460ba044abcdf8df88b0ff79a6f635be8d3
Status: Downloaded newer image for ubuntu:16.04
Hello World