Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rabbitmq Dockerfile
FROM ubuntu:14.04
ENV DEBIAN_FRONTEND noninteractive
RUN echo 'APT::Install-Recommends "0"; \n\
APT::Get::Assume-Yes "true"; \n\
APT::Get::force-yes "true"; \n\
APT::Install-Suggests "0";' > /etc/apt/apt.conf.d/01buildconfig
# Add files.
COPY ./bin/rabbitmq.sh /usr/local/bin/
# Install RabbitMQ.
RUN \
apt-get install wget ca-certificates && \
wget -qO - https://www.rabbitmq.com/rabbitmq-signing-key-public.asc | apt-key add - && \
echo "deb http://www.rabbitmq.com/debian/ testing main" > /etc/apt/sources.list.d/rabbitmq.list && \
apt-get update && \
apt-get install rabbitmq-server && \
rm -rf /var/lib/apt/lists/*
RUN \
rabbitmq-plugins enable rabbitmq_management && \
echo "[{rabbit, [{loopback_users, []}]}]." > /etc/rabbitmq/rabbitmq.config
# Define environment variables.
ENV RABBITMQ_LOG_BASE /data/log
ENV RABBITMQ_MNESIA_BASE /data/mnesia
# Define mount points.
VOLUME ["/data/log", "/data/mnesia"]
# Define working directory.
WORKDIR /data
# Define default command.
CMD ["/usr/local/bin/rabbitmq.sh"]
# Expose ports.
EXPOSE 5672
EXPOSE 15672
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment