docker / cli

The Docker CLI
Apache License 2.0
4.9k stars 1.92k forks source link

How to debug docker cli #2005

Closed npu21 closed 5 years ago

npu21 commented 5 years ago

Description

Steps to reproduce the issue: 1.tried docker --log-level=debug run -it busybox /bin/bash. 2.tried docker -D -d

Describe the results you received: can only see DEBU[0000] [hijack] End of stdout Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version: docker 18.06

(paste your output here)

Output of docker info: Containers: 212 Running: 47 Paused: 0 Stopped: 165 Images: 131 Server Version: 17.03.2-ce Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: false Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 6c463891b1ad274d505ae3bb738e530d1df2b3c7 runc version: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe-dirty (expected: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe) init version: 949e6fa Kernel Version: 3.10.0-862.9.1.ns7_4.37.mips64el Operating System: NeoKylin Linux Server 7.0 (loongson) OSType: linux Architecture: mips64el CPUs: 8 Total Memory: 31.23 GiB

(paste your output here)

Additional environment details (AWS, VirtualBox, physical, etc.):

thaJeztah commented 5 years ago

This is not an issue in the CLI, so --log-level=debug won't give much more information about the problem. The reason that container fails is that the busybox image doesn't have bash installed, which is why you'll get an error

docker --log-level=debug run -it busybox /bin/bash

DEBU[0001] [hijack] End of stdout 
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown.
ERRO[0001] error waiting for container: context canceled

Try running it without /bin/bash as command (or use /bin/sh)

thaJeztah commented 5 years ago

Please keep in mind that the GitHub issue tracker is not intended as a general support forum, but for reporting bugs and feature requests. For other type of questions, consider using one of;

I'm closing this issue because this is not a bug, but feel free to continue the conversation 👍