vicky
vicky

Reputation: 91

Error response from daemon: Cannot start container

docker_admin@Ashoka:~$ sudo docker run sqldb
exec format error
Error response from daemon: Cannot start container 4e1b251d50ceda05f7b4dd0d3eebd13a731bab0f9a5ed4486f4303d8b5f5b272: [8] System error: exec format error

I try to run the image it shows this error, but when I run the same image in interactive mode it runs successful.

Do you know why?

Upvotes: 3

Views: 7673

Answers (3)

halfer
halfer

Reputation: 20440

I have had this problem just now, in an Alpine 3.5 container running in a Mint 18 host. It's not a very helpful error, and as far as I can tell there is no feature to inspect logs unless the container keeps on running.

The problem was this line in my Dockerfile:

ENTRYPOINT ["sleep 500"]

I'm using sleep at present so I can shell into the container and install a few things experimentally before committing it to the Dockerfile. In fact this would have happened if I had tried to put any command with parameters into a single ENTRYPOINT entry. It should have been:

ENTRYPOINT ["sleep", "500"]

Upvotes: 0

Doe
Doe

Reputation: 675

This message is produced when the kernel, for whatever reason, doesn't know how to handle the given executable format. It's a problem that's often associated with scripts that don't include a shebang line, or binaries that are incompatible with your system.

Since you're able to run the image interactively, you probably have a badly written script somewhere in your container.

See: https://github.com/moby/moby/issues/10668

Upvotes: 1

Luiz Lago
Luiz Lago

Reputation: 2659

Try run command using image TAG, execute docker images and get your TAG.

sudo docker run sqldb:1.0

Maybe you need any initial command too

Upvotes: 0

Related Questions