我无法让 rabbitmqadmin 在我的 rabbitmq docker 中工作。
我有这个 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"]
像这样构建它:
docker build --tag=myrabbit .
像这样运行它:
docker run -d -p 8080:15672 myrabbit
它不起作用......日志显示:
/docker-entrypoint.sh: line 8: /usr/local/bin/rabbitmqadmin -q import /rabbitconf.json: No such file or directory
我究竟做错了什么 ?
BR