Jahan Balasubramaniam
Jahan Balasubramaniam

Reputation: 360

Docker: Container command '/bin/sh' not found

When i try to build docker images using the command docker build -t opencv:2.4.11 . I get following error.

Sending build context to Docker daemon 189.8 MB
Step 1 : FROM ubuntu:trusty
 ---> b72889fa879c
Step 2 : RUN apt-get update
 ---> Running in 689f34e138c2
Container command '/bin/sh' could not be invoked.

My docker client and server version are:

Client:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 18:34:23 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 18:34:23 2016
 OS/Arch:      linux/amd64

Any idea?

I have softlinked my /var/lib/docker directory to one of directories present in my home. And that directory is owned by root. Is this the source of problem?

Before moving and softlinking it was fine. I ran out of space in my root partition and so I had to change it to my home partition.

And my home partition is ext4 file system.

Regards

Upvotes: 1

Views: 5172

Answers (1)

Bryan
Bryan

Reputation: 12190

It looks badly hosed.

I have softlinked my /var/lib/docker directory to one of directories present in my home.

I would recommend amending the daemon parameters to include -g your_other_directory instead. Then stop and restart Docker.

If it still doesn't work, delete both Docker directories, re-install, and start at the -g step again.

Upvotes: 1

Related Questions