Here's the chunk of code calling the ARG:
RUN \
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add - && \
echo "deb http://www.rabbitmq.com/debian/ testing main" > /etc/apt/sources.list.d/rabbitmq.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y rabbitmq-server && \
rm -rf /var/lib/apt/lists/* && \
rabbitmq-plugins enable rabbitmq_management && \
echo '[{rabbit, [{loopback_users, []}, {default_user,<<"${RABBITMQ_USER}">>}, {default_pass,<<"${RABBITMQ_PASSWD}">>}]}].' > /etc/rabbitmq/rabbitmq.config
Note the RABBITMQ_PASSWD and RABBITMMQ_USER args
Before this chunk of code, I declared this at the start of the Dockerfile:
FROM ubuntu:14.04
ARG RABBITMQ_USER=123
ARG RABBITMQ_PASSWD=123
And it still isn't working. In the Docker image, cat rabbitmq.config
returns ${RABBITMQ_USER}
verbatim.