赞
踩
D:\接口平台\interface>docker run -d -v D:\接口平台\interface:/var/www/interface -p 9000:9000 --name php tw-jiekou-php:v1
docker: Error response from daemon: No command specified.
See 'docker run --help'.
docker inspect 999600f2d1e7(容器id) [ { "Id": "sha256:999600f2d1e7fc9ef114384c23da96c7eb3186280d62c792b6bfe04e91b836a9", "RepoTags": [ "tw-jiekou-php:v1" ], "RepoDigests": [], "Parent": "", "Comment": "Imported from -", "Created": "2021-12-15T04:00:19.509783Z", "Container": "", "ContainerConfig": { "Hostname": "", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": null, "Cmd": null, "Image": "", "Volumes": null, "WorkingDir": "", "Entrypoint": null, "OnBuild": null, "Labels": null }, "DockerVersion": "20.10.8", "Author": "", "Config": { "Hostname": "", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": null, "Cmd": null, // **此处cmd为null** "Image": "", "Volumes": null, "WorkingDir": "", "Entrypoint": null, "OnBuild": null, "Labels": null }, 省略......
docker run -d -v D:\接口平台\interface:/var/www/interface -p 9000:9000 --name php tw-jiekou-php:v1 /bin/bash
D:\接口平台\interface>docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c0f2fd220cfa tw-jiekou-php:v1 "/bin/bash" 5 minutes ago Exited (0) 5 minutes ago php
876924cf1bd3 redis "docker-entrypoint.s…" 29 hours ago Up 5 hours 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp redis
D:\接口平台\interface>docker run -d -v D:\接口平台\interface:/var/www/interface -p 9000:9000 --name php tw-jiekou-php:v1 /bin/bash docker-php-entrypoint php-fpm
faa98dd2115782fe5f4cb8d3510baa9b1c3df8aeda2cf26dc69cc36dbd5a54d6
D:\接口平台\interface>docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
faa98dd21157 tw-jiekou-php:v1 "/bin/bash docker-ph…" 5 seconds ago Up 3 seconds 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp php
876924cf1bd3 redis "docker-entrypoint.s…" 29 hours ago Up 5 hours 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp redis
# docker ps -a --no-trunc 展示全部容器信息
D:\接口平台\interface>docker ps -a --no-trunc
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
faa98dd2115782fe5f4cb8d3510baa9b1c3df8aeda2cf26dc69cc36dbd5a54d6 tw-jiekou-php:v1 "/bin/bash docker-php-entrypoint php-fpm" 28 minutes ago Up 28 minutes 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp nginx/php,php
876924cf1bd333a31967dfa9ace19d750b012dc8b88d7130a374efff65d9ec76 redis "docker-entrypoint.sh redis-server /data/redis.conf --appendonly yes" 29 hours ago Up 6 hours 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp redis
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。