Last active
February 26, 2025 22:10
-
-
Save an01f01/b51e27773818430b3d75550cb45eda4e to your computer and use it in GitHub Desktop.
RabbitMQ Docker File
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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