Easy Way to Install RabbitMQ on Ubuntu Xenial (Ubuntu 16.04)

Are there any clear, concise instructions for creating a Docker container with rabbitmq on Xenial that actually work?

I'm running rabbitmq in a Docker container and for some reason, installing it is a nightmare. Every time Erlang or rabbitmq has some update, one becomes incompatible with the other, and I get cryptic dependency issues. The rabbitmq installation page does not provide step-by-step instructions, and every permutation I've tried has some sort of error (see below for the latest).


RUN  wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
RUN dpkg -i erlang-solutions_1.0_all.deb
RUN apt-get update
# Then install rabbitmq.
RUN echo "deb https://dl.bintray.com/rabbitmq/debian xenial main" | \
    tee /etc/apt/sources.list.d/bintray.rabbitmq.list && \
    wget -O- https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc | \
    apt-key add -

Cryptic rabbitmq error:

=SUPERVISOR REPORT==== 26-Jun-2018::03:04:55.163161 ===
    supervisor: {local,'Elixir.Logger.Supervisor'}
    errorContext: start_error
    reason: noproc


  • The two answers posted here are admirable, but they don't answer the original question: provide a Dockerfile that installs compatible versions of Erlang and rabbitmq.

    Below is such a solution (took much trial and error). It installs erlang 1:20.3.6 and rabbitmq 3.7.6. Changing the version should only require a change to the last line of this Dockerfile.

    # Install Erlang + Rabbitmq
    # Install the erlang downloader
    RUN wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && \
        dpkg -i erlang-solutions_1.0_all.deb
    # Add the rabbitmq source list
    RUN echo "deb https://dl.bintray.com/rabbitmq/debian xenial main" | \
        tee /etc/apt/sources.list.d/bintray.rabbitmq.list && \
        wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | apt-key add -
    # Check which rabbitmq/erlang versions are compatible and isntall:
    #       https://www.rabbitmq.com/which-erlang.html
    RUN apt-get update && \
        apt-get install -y esl-erlang=1:20.3.6 rabbitmq-server=3.7.6-1