rabbitmq - Running rabbitmqadmin in docker fails -


i cant rabbitmqadmin work in rabbitmq docker.

i have dockerfile:

from rabbitmq:3-management  run apt-get update && apt-get install -y python  add rabbitmqadmin /usr/local/bin/rabbitmqadmin add rabbitconf.json /rabbitconf.json  run chmod 755 /usr/local/bin/rabbitmqadmin  cmd ["/usr/local/bin/rabbitmqadmin -q import /rabbitconf.json"] 

build this:

docker build --tag=myrabbit . 

run this:

docker run -d -p 8080:15672 myrabbit 

it not work... log shows:

/docker-entrypoint.sh: line 8: /usr/local/bin/rabbitmqadmin -q import     /rabbitconf.json: no such file or directory 

what doing wrong ?

br

you've mixed shell , exec formats cmd instruction.

cmd /usr/local/bin/rabbitmqadmin -q import /rabbitconf.json 

should work.

for more information see http://docs.docker.com/reference/builder/#cmd.

i'll leave following else debugging similar problems:

the parent image rabbitmq:3-management declares entrypoint runs docker-entrypoint.sh script. cmd instruction passed entrypoint script argument. somewhere in script, things go wrong.

without seeing script, can't debug problem. however, 1 workaround override entrypoint instruction either in dockerfile or on command line. example, happens if run:

docker run -d -p 8080:15672 --entrypoint="" myrabbit 

note isn't correct solution; should try use entrypoint script of parent image, or fix want.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -