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: Error response from daemon: Container command '/bin/sh' not found or does not exist.. #22771

Closed
polonskiy opened this issue May 16, 2016 · 10 comments

Comments

@polonskiy
Copy link
Contributor

Output of docker version:

Client:
 Version:      1.11.1
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   5604cbe
 Built:        Tue Apr 26 23:43:49 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.11.1
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   5604cbe
 Built:        Tue Apr 26 23:43:49 2016
 OS/Arch:      linux/amd64

Output of docker info:

Containers: 8
 Running: 0
 Paused: 0
 Stopped: 8
Images: 14
Server Version: 1.11.1
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 33
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge null host
Kernel Version: 4.4.0-22-generic
Operating System: Ubuntu 16.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.705 GiB
Name: aspire
ID: HVAI:CWZ7:U7A7:VFZS:UNV2:EIZC:Z6BM:LJFN:GOPZ:DE5N:B7TF:XSOP
Docker Root Dir: /var/lib/docker
Debug mode (client): false
Debug mode (server): true
 File Descriptors: 15
 Goroutines: 35
 System Time: 2016-05-16T22:52:06.749252777+03:00
 EventsListeners: 0
Registry: https://index.docker.io/v1/
WARNING: No swap limit support

Steps to reproduce the issue:

wget -q https://raw.githubusercontent.com/jpetazzo/syslogdocker/master/Dockerfile
docker build -t syslog .
docker run --name syslog -d -v /tmp/syslogdev:/dev syslog
Sending build context to Docker daemon 7.168 kB
Step 1 : FROM ubuntu:14.04
 ---> 90d5884b1ee0
Step 2 : RUN apt-get update -q
 ---> Using cache
 ---> 45c7c8b50af8
Step 3 : RUN apt-get install rsyslog
 ---> Using cache
 ---> 2b9806e63875
Step 4 : CMD rsyslogd -n
 ---> Using cache
 ---> 9503f1bffaa7
Step 5 : VOLUME /dev
 ---> Using cache
 ---> 42ae5460c9c8
Step 6 : VOLUME /var/log
 ---> Using cache
 ---> e4b89b5720e7
Successfully built e4b89b5720e7
2fd05b6fc8f4f80a0f1436e64a25c11661f46b0f1710386928e7009b9b336903
docker: Error response from daemon: Container command '/bin/sh' not found or does not exist..
@HackToday
Copy link
Contributor

seems overlay would hit another issue

[centos@extradeploy-b0414de2-e590-4a09-bf9d-431fcd30367a ~]$ sudo docker build -t syslog .
Sending build context to Docker daemon  7.68 kB
Step 1 : FROM ubuntu:14.04
14.04: Pulling from library/ubuntu
6599cadaf950: Pull complete 
23eda618d451: Pull complete 
f0be3084efe9: Pull complete 
52de432f084b: Pull complete 
a3ed95caeb02: Pull complete 
Digest: sha256:15b79a6654811c8d992ebacdfbd5152fcf3d165e374e264076aa435214a947a3
Status: Downloaded newer image for ubuntu:14.04
 ---> 90d5884b1ee0
Step 2 : RUN apt-get update -q
mkdir /var/lib/docker/overlay/79e2c15415b8a728f90055e5dd099fd66f4e819f06a7c8121d54148e88a2275c-init/merged/dev/shm: invalid argument

I tried on centos 7.2 with docker 1.11.1

@justincormack
Copy link
Contributor

cc @jpetazzo

This container really isn't portable, not really surprised it doesn't run. See jpetazzo/syslogdocker#4 (comment) for some notes on a version that might work better.

The error is a bit confusing, and quite hard to debug, but I think it is to do with missing device nodes.

@thaJeztah
Copy link
Member

Also, this looks like a duplicate of #20228, so I'll close this one

@justincormack
Copy link
Contributor

AH yes, it is the same as that issue. Just surprised it ever worked!

@polonskiy
Copy link
Contributor Author

Thanks

@justincormack
Copy link
Contributor

You can probably make it work with docker run -v /dev:/dev syslog (there are then some other permissions issues that need fixing, you may need some privileges).

@justincormack
Copy link
Contributor

(Although using a log driver seems much easier).

@thaJeztah
Copy link
Member

Yes, I think that image and article were written when there was not yet a syslog driver for docker.

ping @jpetazzo perhaps you can make a mention on that repository and related blog post (I think it was from a blog post)?

@polonskiy
Copy link
Contributor Author

@HackToday
Copy link
Contributor

HackToday commented May 17, 2016

@thaJeztah Right now I did not think it is same issue as #20228, as it still not solved and in 1.10.*

But I tried it work on 1.10.2 environment, with

Removing intermediate container 7a65b3740cfa
Step 5 : VOLUME /dev
 ---> Running in b6cd734498f5
 ---> 590c1837bb63
Removing intermediate container b6cd734498f5
Step 6 : VOLUME /var/log
 ---> Running in 10070584f082
 ---> 1b79e5a590e6
Removing intermediate container 10070584f082
Successfully built 1b79e5a590e6```

but it hit issue for 1.11.1 overlay

$ sudo docker build -t syslog .
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM ubuntu:14.04
 ---> 90d5884b1ee0
Step 2 : RUN apt-get update -q
mkdir /var/lib/docker/overlay/1047c11c1d996021e10ad27409bdb2668944b74c3addbab575099f706ed2980d-init/merged/dev/shm: invalid argument

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

5 participants