Я новичок в Docker и пытаюсь понять, как он работает. Я установил докер для экземпляра virtualbox centos 7. Сервис работает нормально, но когда я запускаю образ hello-world, он выдает следующую ошибку.
[root@localhost ~]# docker run hello-world
docker: Error response from daemon: OCI runtime create failed:
container_linux.go:344: starting container process caused "exec: \"/hello\":
stat /hello: no such file or directory": unknown.
Я пробовал $ docker system prune, но снова не работал. Вот вся история командной строки, которая включает системную информацию и информацию о докере.
[root@localhost ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
[root@localhost ~]# docker --version
Docker version 18.09.3, build 774a1f4
[root@localhost ~]# docker run hello-world
docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"/hello\": stat /hello: no such file or directory": unknown.
[root@localhost ~]# docker system prune
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all dangling images
- all dangling build cache
Are you sure you want to continue? [y/N] y
Deleted Containers:
ace04702bb0e2a1997dc35a0a21c7ca49a395809e5d1da98ddc99ee16544dcc4
e70f5999470577d0eca655643b7ba2ce41ee99495bb257d8ca5f956c26a7079b
82f65c36f76cf2cbf6297a514865d45524bf3cb4472be5e5da72c632cd535a3b
Total reclaimed space: 0B
[root@localhost ~]# docker run hello-world
docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"/hello\": stat /hello: no such file or directory": unknown.
[root@localhost ~]# docker info
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 1
Server Version: 18.09.3
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: e6b3f5632f50dbc4e9cb6288d911bf4f5e95b18e
runc version: 6635b4f0c6af3810594d2770f662f34ddc15b40d
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-957.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 3.701GiB
Name: localhost.localdomain
ID: R2XU:6ZAF:2UZO:QBUR:GGWW:GFIG:DHVF:5DZG:DPG2:GIKV:3GE5:NLS2
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine