Skip to content

Commit 499c201

Browse files
HoloRinyosifkit
andauthored
Add "loopback_users" configuration snippet to the 3.9 image (#501)
This allows the default user to connect from outside the running container, which has been the case for the 3.8 series, but is not currently the case with the 3.9 rc Co-authored-by: Joe Ferguson <[email protected]>
1 parent 9331f6a commit 499c201

9 files changed

+37
-0
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/*/**/*.conf linguist-generated
12
/*/**/Dockerfile linguist-generated
23
/*/**/docker-entrypoint.sh linguist-generated
34
/Dockerfile*.template linguist-language=Dockerfile

10-default-guest-user.conf

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## DEFAULT SETTINGS ARE NOT MEANT TO BE TAKEN STRAIGHT INTO PRODUCTION
2+
## see https://www.rabbitmq.com/configure.html for further information
3+
## on configuring RabbitMQ
4+
5+
## allow access to the guest user from anywhere on the network
6+
## https://www.rabbitmq.com/access-control.html#loopback-users
7+
## https://www.rabbitmq.com/production-checklist.html#users
8+
loopback_users.guest = false

3.9-rc/alpine/10-default-guest-user.conf

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.9-rc/alpine/Dockerfile

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.9-rc/ubuntu/10-default-guest-user.conf

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.9-rc/ubuntu/Dockerfile

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile-alpine.template

+3
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ VOLUME $RABBITMQ_DATA_DIR
270270
# https://docs.docker.com/samples/library/ubuntu/#locales
271271
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
272272

273+
{{ if ([ "3.8", "3.8-rc" ] | index(env.version)) then "" else ( -}}
274+
COPY --chown=rabbitmq:rabbitmq 10-default-guest-user.conf /etc/rabbitmq/conf.d/
275+
{{ ) end -}}
273276
COPY docker-entrypoint.sh /usr/local/bin/
274277
ENTRYPOINT ["docker-entrypoint.sh"]
275278

Dockerfile-ubuntu.template

+3
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ VOLUME $RABBITMQ_DATA_DIR
288288
# https://docs.docker.com/samples/library/ubuntu/#locales
289289
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
290290

291+
{{ if ([ "3.8", "3.8-rc" ] | index(env.version)) then "" else ( -}}
292+
COPY --chown=rabbitmq:rabbitmq 10-default-guest-user.conf /etc/rabbitmq/conf.d/
293+
{{ ) end -}}
291294
COPY docker-entrypoint.sh /usr/local/bin/
292295
ENTRYPOINT ["docker-entrypoint.sh"]
293296

apply-templates.sh

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ for version; do
4848
fi
4949
cp -a "$entrypoint" "$version/$variant/docker-entrypoint.sh"
5050

51+
if [ "$rcVersion" != '3.8' ]; then
52+
cp 10-default-guest-user.conf "$version/$variant/"
53+
fi
54+
5155
if [ "$variant" = 'alpine' ]; then
5256
sed -i -e 's/gosu/su-exec/g' "$version/$variant/docker-entrypoint.sh"
5357
fi

0 commit comments

Comments
 (0)