Skip to content

Commit 573b50a

Browse files
committed
Adjust management images for 3.9
1 parent a4b8d64 commit 573b50a

File tree

5 files changed

+21
-25
lines changed

5 files changed

+21
-25
lines changed

3.8-rc/alpine/management/Dockerfile

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.8-rc/ubuntu/management/Dockerfile

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.8/alpine/management/Dockerfile

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.8/ubuntu/management/Dockerfile

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile-management.template

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ FROM {{
33
+ if env.variant == "alpine" then "-alpine" else "" end
44
}}
55

6-
RUN rabbitmq-plugins enable --offline rabbitmq_management
7-
6+
RUN set eux; \
7+
rabbitmq-plugins enable --offline rabbitmq_management; \
88
# make sure the metrics collector is re-enabled (disabled in the base image for Prometheus-style metrics by default)
9-
RUN rm -f /etc/rabbitmq/conf.d/management_agent.disable_metrics_collector.conf
10-
9+
rm -f /etc/rabbitmq/conf.d/management_agent.disable_metrics_collector.conf; \
10+
{{ if .version | startswith("3.8") then ( -}}
1111
# extract "rabbitmqadmin" from inside the "rabbitmq_management-X.Y.Z.ez" plugin zipfile
1212
# see https://github.com/docker-library/rabbitmq/issues/207
13-
RUN set -eux; \
1413
erl -noinput -eval ' \
1514
{ ok, AdminBin } = zip:foldl(fun(FileInArchive, GetInfo, GetBin, Acc) -> \
1615
case Acc of \
@@ -25,6 +24,11 @@ RUN set -eux; \
2524
io:format("~s", [ AdminBin ]), \
2625
init:stop(). \
2726
' -- /plugins/rabbitmq_management-*.ez > /usr/local/bin/rabbitmqadmin; \
27+
{{ ) else ( -}}
28+
# grab "rabbitmqadmin" from inside the "rabbitmq_management-X.Y.Z" plugin folder
29+
# see https://github.com/docker-library/rabbitmq/issues/207
30+
cp /plugins/rabbitmq_management-*/priv/www/cli/rabbitmqadmin /usr/local/bin/rabbitmqadmin; \
31+
{{ ) end -}}
2832
[ -s /usr/local/bin/rabbitmqadmin ]; \
2933
chmod +x /usr/local/bin/rabbitmqadmin; \
3034
{{ if env.variant == "alpine" then ( -}}

0 commit comments

Comments
 (0)