docker 如何查看已存在容器的创建命令
docker ps
Usage: docker ps [OPTIONS]
List containers
Options:
-a, --all Show all containers (default shows just running)
-f, --filter value Filter output based on conditions provided (default [])
- exited=<int> an exit code of <int>
- label=<key> or label=<key>=<value>
- status=(created|restarting|running|paused|exited)
- name=<string> a container's name
- id=<ID> a container's ID
- before=(<container-name>|<container-id>)
- since=(<container-name>|<container-id>)
- ancestor=(<image-name>[:tag]|<image-id>|<image@digest>)
containers created from an image or a descendant.
--format string Pretty-print containers using a Go template
--help Print usage
-n, --last int Show n last created containers (includes all states) (default -1)
-l, --latest Show the latest created container (includes all states)
--no-trunc Don't truncate output
-q, --quiet Only display numeric IDs
-s, --size Display total file sizes
docker exec -it myphp-fpm bash 进入容器 myphp-fpm 这个是容器名
2 回答2.4k 阅读✓ 已解决
2 回答1.9k 阅读✓ 已解决
1 回答1.3k 阅读✓ 已解决
1 回答1.5k 阅读✓ 已解决
2 回答1.2k 阅读✓ 已解决
1 回答1.3k 阅读✓ 已解决
1 回答966 阅读✓ 已解决
如果想看容器创建命令的话, 好像不行, 但可以看容器的详细信息, 里边有数据卷、环境变量、容器启动执行的命令。