diff --git a/.gitattributes b/.gitattributes index 14a11226..8e2ce923 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ +/*/**/*.conf linguist-generated /*/**/Dockerfile linguist-generated /*/**/docker-entrypoint.sh linguist-generated /Dockerfile*.template linguist-language=Dockerfile diff --git a/10-default-guest-user.conf b/10-default-guest-user.conf new file mode 100644 index 00000000..3d905739 --- /dev/null +++ b/10-default-guest-user.conf @@ -0,0 +1,8 @@ +## DEFAULT SETTINGS ARE NOT MEANT TO BE TAKEN STRAIGHT INTO PRODUCTION +## see https://www.rabbitmq.com/configure.html for further information +## on configuring RabbitMQ + +## allow access to the guest user from anywhere on the network +## https://www.rabbitmq.com/access-control.html#loopback-users +## https://www.rabbitmq.com/production-checklist.html#users +loopback_users.guest = false diff --git a/3.9-rc/alpine/10-default-guest-user.conf b/3.9-rc/alpine/10-default-guest-user.conf new file mode 100644 index 00000000..3d905739 --- /dev/null +++ b/3.9-rc/alpine/10-default-guest-user.conf @@ -0,0 +1,8 @@ +## DEFAULT SETTINGS ARE NOT MEANT TO BE TAKEN STRAIGHT INTO PRODUCTION +## see https://www.rabbitmq.com/configure.html for further information +## on configuring RabbitMQ + +## allow access to the guest user from anywhere on the network +## https://www.rabbitmq.com/access-control.html#loopback-users +## https://www.rabbitmq.com/production-checklist.html#users +loopback_users.guest = false diff --git a/3.9-rc/alpine/Dockerfile b/3.9-rc/alpine/Dockerfile index e96543da..d0fc7d75 100644 --- a/3.9-rc/alpine/Dockerfile +++ b/3.9-rc/alpine/Dockerfile @@ -254,6 +254,7 @@ VOLUME $RABBITMQ_DATA_DIR # https://docs.docker.com/samples/library/ubuntu/#locales ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8 +COPY --chown=rabbitmq:rabbitmq 10-default-guest-user.conf /etc/rabbitmq/conf.d/ COPY docker-entrypoint.sh /usr/local/bin/ ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/3.9-rc/ubuntu/10-default-guest-user.conf b/3.9-rc/ubuntu/10-default-guest-user.conf new file mode 100644 index 00000000..3d905739 --- /dev/null +++ b/3.9-rc/ubuntu/10-default-guest-user.conf @@ -0,0 +1,8 @@ +## DEFAULT SETTINGS ARE NOT MEANT TO BE TAKEN STRAIGHT INTO PRODUCTION +## see https://www.rabbitmq.com/configure.html for further information +## on configuring RabbitMQ + +## allow access to the guest user from anywhere on the network +## https://www.rabbitmq.com/access-control.html#loopback-users +## https://www.rabbitmq.com/production-checklist.html#users +loopback_users.guest = false diff --git a/3.9-rc/ubuntu/Dockerfile b/3.9-rc/ubuntu/Dockerfile index 2cd8881d..4014ca35 100644 --- a/3.9-rc/ubuntu/Dockerfile +++ b/3.9-rc/ubuntu/Dockerfile @@ -272,6 +272,7 @@ VOLUME $RABBITMQ_DATA_DIR # https://docs.docker.com/samples/library/ubuntu/#locales ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8 +COPY --chown=rabbitmq:rabbitmq 10-default-guest-user.conf /etc/rabbitmq/conf.d/ COPY docker-entrypoint.sh /usr/local/bin/ ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index a90ca289..f90cd502 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -270,6 +270,9 @@ VOLUME $RABBITMQ_DATA_DIR # https://docs.docker.com/samples/library/ubuntu/#locales ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8 +{{ if ([ "3.8", "3.8-rc" ] | index(env.version)) then "" else ( -}} +COPY --chown=rabbitmq:rabbitmq 10-default-guest-user.conf /etc/rabbitmq/conf.d/ +{{ ) end -}} COPY docker-entrypoint.sh /usr/local/bin/ ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/Dockerfile-ubuntu.template b/Dockerfile-ubuntu.template index 7ebbdf14..dcbcaa56 100644 --- a/Dockerfile-ubuntu.template +++ b/Dockerfile-ubuntu.template @@ -288,6 +288,9 @@ VOLUME $RABBITMQ_DATA_DIR # https://docs.docker.com/samples/library/ubuntu/#locales ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8 +{{ if ([ "3.8", "3.8-rc" ] | index(env.version)) then "" else ( -}} +COPY --chown=rabbitmq:rabbitmq 10-default-guest-user.conf /etc/rabbitmq/conf.d/ +{{ ) end -}} COPY docker-entrypoint.sh /usr/local/bin/ ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/apply-templates.sh b/apply-templates.sh index 7b593ff4..50e9fce4 100755 --- a/apply-templates.sh +++ b/apply-templates.sh @@ -48,6 +48,10 @@ for version; do fi cp -a "$entrypoint" "$version/$variant/docker-entrypoint.sh" + if [ "$rcVersion" != '3.8' ]; then + cp 10-default-guest-user.conf "$version/$variant/" + fi + if [ "$variant" = 'alpine' ]; then sed -i -e 's/gosu/su-exec/g' "$version/$variant/docker-entrypoint.sh" fi