API error (500): Container command not found or does not exist

3/4/2016

kubectl describe pods logs

pods logs logs

command: - bundle exec unicorn -c config/unicorn/production.rb -E production

The container can't start on k8s and some errors occured .

But when I exec

docker run -d image [CMD]

The container works well.

-- huhuhu
kubernetes

2 Answers

3/8/2016

"command" is an array, so each argument has to be a separate element, not all on one line

-- DavidO
Source: StackOverflow

4/24/2016

For anyone else running into this problem:

make sure the gems (including unicorn) are actually installed in the volume used by the container. If not, do a bundle install.

Another reason for this kind of error could be that the directory specified under working_dir (in the docker-compose.yml) does not exist (see Misleading error message "ERROR: Container command not found or does not exist.").

-- kitteehh
Source: StackOverflow