Skip to content

Instantly share code, notes, and snippets.

@an01f01
Last active February 26, 2025 22:10
Show Gist options
  • Save an01f01/b51e27773818430b3d75550cb45eda4e to your computer and use it in GitHub Desktop.
Save an01f01/b51e27773818430b3d75550cb45eda4e to your computer and use it in GitHub Desktop.
RabbitMQ Docker File
# Use the official RabbitMQ image as the base image
FROM rabbitmq:latest
# Set environment variables for configuration
ENV RABBITMQ_DEFAULT_USER=utest
ENV RABBITMQ_DEFAULT_PASS=test1234
# Add labels for better maintainability
LABEL version="1.0"
LABEL description="Dockerfile for running RabbitMQ"
RUN rabbitmq-plugins enable rabbitmq_mqtt
RUN rabbitmq-plugins enable rabbitmq_management
# Expose the default RabbitMQ port
EXPOSE 1883 5672 15672
# Start RabbitMQ server on container startup
CMD ["rabbitmq-server"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment