Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker command 'run' doesn't work #26624

Closed
korabelnikov opened this issue Sep 16, 2016 · 3 comments
Closed

docker command 'run' doesn't work #26624

korabelnikov opened this issue Sep 16, 2016 · 3 comments

Comments

@korabelnikov
Copy link

$ docker run -t -i nvidia/digits /bin/bash
usage: gunicorn [OPTIONS] APP_MODULE
gunicorn: error: No application module specified.

i have try use 'nvidia-docker' instead 'docker', it have no effect.

Others command, like start, exec works properly.

Output of docker version:
Client:
Version: 1.12.1
API version: 1.24
Go version: go1.7.1
Git commit: 23cf638
Built:
OS/Arch: linux/amd64

Server:
Version: 1.12.1
API version: 1.24
Go version: go1.7.1
Git commit: 23cf638
Built:
OS/Arch: linux/amd64

Output of docker info:
Containers: 43
Running: 3
Paused: 0
Stopped: 40
Images: 17
Server Version: 1.12.1
Storage Driver: btrfs
Build Version: Btrfs v4.7.1
Library Version: 101
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: nvidia-docker local
Network: null host bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.15-gentoo
Operating System: Gentoo/Linux
OSType: linux
Architecture: x86_64
CPUs: 24
Total Memory: 251.8 GiB
Name: Beelzebub
ID: CYUG:T3FX:PPBU:HOPF:LCKV:5WWS:DUJJ:ICHZ:2O3F:EMKP:QFPX:5BOB
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8

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

I'm using nvidia-digits image. Host OS is gentoo.

@thaJeztah
Copy link
Member

This is because the nvidia/digits image has an entrypoint: https://github.com/NVIDIA/nvidia-docker/blob/master/ubuntu-14.04/digits/4.0/Dockerfile#L24

So running docker run -it nvidia/digits /bin/bash will result in /bin/bash being passed as arguments to the entrypoint (./digits-server), and this will be executed:

/usr/share/digits/digits-server /bin/bash

This is not a bug in Docker, but incorrect use of the nvidia/digits image. I suggest to read the documentation of those images to get more information about how to run them https://github.com/NVIDIA/nvidia-docker

I'll close this issue, because this is not a bug, but feel free to comment after I closed

@korabelnikov
Copy link
Author

@thaJeztah Thanks.
but how i can execute my own command with docker run ?

@thaJeztah
Copy link
Member

Resetting an entrypoint can be tricky, but will be made simpler in docker 1.13, see #23718, and #23498 (I think there's a workaround mentioned there) Alternatively;

  • start the container with the regular command, and use docker exec -it <container name> bash to get a shell in the container
  • if you want to create a custom version of the image with a different command, extend the image by creating a Dockerfile that uses FROM nvidia/digits that resets the entrypoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants