docker / docker/docker-py

client.containers.run("ubuntu:latest", "echo hello world") not working

Open
#2,866 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

when I run

import docker
client = docker.from_env()
client.containers.run("ubuntu:latest", "echo hello world")

and waiting a lot, and not any output.

and image on local.

image

image

docker into

Containers: 7
 Running: 0
 Paused: 0
 Stopped: 7
Images: 10
Server Version: 18.09.6
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: false
Logging Driver: journald
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: 
 NodeID: 
 Is Manager: false
 Node Address: 
Runtimes: nvidia runc
Default Runtime: nvidia
Init Binary: docker-init
containerd version: ed45de45998cd7faa636233bf82bef159eb6af23
runc version: f00e93a680ee7f2e9c3c4f737c54d43753808c5b
init version: N/A (expected: )
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.10.107-1-xxx_kvm_guest-0049
Operating System: xxx tlinux 2.2 (Final)
OSType: linux
Architecture: x86_64
CPUs: 10
Total Memory: 39.04GiB
Name: VM-230-48-centos
ID: XSAE:HW32:KZQW:GWV6:TDYI:74CK:RBR7:CGQG:WEM6:PRBN:DPYG:LHQW
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: xxx
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
xxxxx
 10.0.0.0/8
 100.64.0.0/10
 9.0.0.0/8
 127.0.0.0/8
Registry Mirrors:
xxx
Live Restore Enabled: true

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the shown client.containers.run("ubuntu:latest", "echo hello world") call with the provided Docker environment details. Inspect the behavior of docker.from_env and client.containers.run, then establish whether the issue is in the library or environment; done means the cause and a verified resolution are clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.