-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile20
95 lines (71 loc) · 3.44 KB
/
Dockerfile20
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#
# RabbitMQ Dockerfile
#
# https://github.com/tamboraorg/docker/crerabbitmq
#
# Pull base image.
FROM credocker/creerlang:2020.0
MAINTAINER Michael Kahle <[email protected]>
ARG BUILD_YEAR=2020
ARG BUILD_MONTH=0
ARG BUILD_TAG=latest
# version: yyyy.n for stable versions / 0.yyyy for development
ENV INITRD No
ENV RABBITMQ_VERSION 3.8.3
ENV RABBIT_DELAY_VERSION 3.8.0
# 3.6.0
LABEL Name="RabbitMQ for CRE" \
CRE=$CRE_VERSION \
Year=$BUILD_YEAR \
Month=$BUILD_MONTH \
Version=$RABBITMQ_VERSION \
OS="Ubuntu:$UBUNTU_VERSION" \
Build_=$BUILD_TAG
# Install RabbitMQ
### --- Install latest version vs official version ---
#--- Ubuntu 20.04 NEW ---
## RUN apt-key adv --keyserver "hkps://keys.openpgp.org" --recv-keys "0x0A9AF2115F4687BD29803A206B73A36E6026DFCA"
## RUN apt-key adv --keyserver "keyserver.ubuntu.com" --recv-keys "F77F1EDA57EBB1CC"
## RUN curl -1sLf 'https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey' | sudo apt-key add -
## RUN apt install apt-transport-https -y \
## RUN echo "deb http://ppa.launchpad.net/rabbitmq/rabbitmq-erlang/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/rabbitmq.list
## RUN echo "deb https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/rabbitmq.list
#list available packages
RUN apt list -a rabbitmq-server
## RUN apt update -y && apt install -y rabbitmq-server=3.8.\* && rabbitmq-plugins enable rabbitmq_management
RUN apt update -y && apt install -y rabbitmq-server && rabbitmq-plugins enable rabbitmq_management
# works
RUN rabbitmq-plugins list
#RUN rabbitmq-diagnostics help
#RUN rabbitmq-diagnostics status --help
RUN ls -l /usr/lib/rabbitmq/lib
#RUN ls -l /usr/lib/rabbitmq/lib/rabbitmq_server-$RABBITMQ_VERSION/plugins
# node needs to run...
# RUN rabbitmq-diagnostics environment
# RUN rabbitmq-diagnostics erlang_version
# config file -> timeout
COPY cre/rabbitmq.conf /etc/rabbitmq/rabbitmq.conf
ENV RABBITMQ_CONFIG_FILE /etc/rabbitmq/rabbitmq.conf
COPY cre /cre
WORKDIR /cre/
ENV RABBITMQ_PLUGINS_DIR /cre/plugins:/usr/lib/rabbitmq/lib/rabbitmq_server-$RABBITMQ_VERSION/plugins
RUN echo $RABBITMQ_PLUGINS_DIR
# delay plugin
## see versions at: https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases
## RUN wget "https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/$RABBIT_DELAY_VERSION/rabbitmq_delayed_message_exchange-$RABBIT_DELAY_VERSION.ez" -O /cre/plugins/rabbitmq_delayed_message_exchange.ez
RUN cp "/cre/plugins/v$RABBIT_DELAY_VERSION/rabbitmq_delayed_message_exchange-$RABBIT_DELAY_VERSION.ez" /cre/plugins/rabbitmq_delayed_message_exchange.ez
RUN rabbitmq-plugins enable rabbitmq_delayed_message_exchange
RUN rabbitmq-plugins list
# https://www.rabbitmq.com/web-mqtt.html ##port:15675
RUN rabbitmq-plugins enable rabbitmq_mqtt
RUN rabbitmq-plugins enable rabbitmq_web_mqtt
RUN rabbitmq-plugins list
#RUN rabbitmqadmin -v
RUN mkdir -p /cre && touch /cre/versions.txt && \
echo "$(date +'%F %R') \t rabbitMq \t $(rabbitmqctl version)" >> /cre/versions.txt && \
echo "$(date +'%F %R') \t $(rabbitmq-plugins list | grep rabbitmq_delayed_message_exchange)" >> /cre/versions.txt && \
echo "$(date +'%F %R') \t $(rabbitmq-plugins list | grep rabbitmq_mqtt)" >> /cre/versions.txt
EXPOSE 15672 15675 5672 25672 1883
# 4369 5671 5672 15691 15692
ENTRYPOINT ["/cre/rabbitmq-entrypoint.sh"]
CMD ["shoreman", "/cre/rabbitmq-procfile"]