I'm trying to make a Dockerfile based on the RabbitMQ repository with a customized policy set. The problem is that I can't useCMD
or ENTRYPOINT
since it will override the base Dockerfile's and then I have to come up with my own and I don't want to go down that path. Let alone the fact if I don't use RUN
, it will be a part of run time commands and I want this to be included in the image, not just the container.
Other thing I can do is to use RUN
command but the problem with that is the RabbitMQ server is not running at build time and also there's no --offline
flag for the set_policy
command of rabbitmqctl
program.
When I use docker's RUN
command to set the policy, here's the error I face:
Error: unable to connect to node rabbit@e06f5a03fe1f: nodedown
DIAGNOSTICS
===========
attempted to contact: [rabbit@e06f5a03fe1f]
rabbit@e06f5a03fe1f:
* connected to epmd (port 4369) on e06f5a03fe1f
* epmd reports: node 'rabbit' not running at all
no other nodes on e06f5a03fe1f
* suggestion: start the node
current node details:
- node name: 'rabbitmq-cli-136@e06f5a03fe1f'
- home dir: /var/lib/rabbitmq
- cookie hash: /Rw7u05NmU/ZMNV+F856Fg==
So is there any way I can set a policy for the RabbitMQ without writing my own version of CMD
and/or ENTRYPOINT
?