Skip to content

Commit 883fff0

Browse files
HoloRinmichaelklishin
authored andcommitted
Merge pull request #3189 from rabbitmq/docker-library-rabbitmq-500
Bring the docker image up to date with the docker-library version (cherry picked from commit c8cfd02) (cherry picked from commit bb41355)
1 parent 8a426c8 commit 883fff0

File tree

5 files changed

+52
-412
lines changed

5 files changed

+52
-412
lines changed

deps/rabbitmq_peer_discovery_aws/test/integration_SUITE.erl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ cluster_was_formed(Config) ->
125125
?assertEqual(lists:sort(N2Nodes), lists:sort(N3Nodes)).
126126

127127
register_tagged_task(Config) ->
128+
RabbitmqDefaultUser = ?config(rabbitmq_default_user, Config),
129+
RabbitmqDefaultPass = ?config(rabbitmq_default_pass, Config),
128130
RabbitmqConf = string:join([
131+
"default_user = " ++ RabbitmqDefaultUser,
132+
"default_pass = " ++ RabbitmqDefaultPass,
129133
"cluster_formation.peer_discovery_backend = aws",
130134
"cluster_formation.aws.instance_tags.service = rabbitmq",
131135
""
@@ -134,7 +138,11 @@ register_tagged_task(Config) ->
134138
aws_ecs_util:register_task(Config, TaskJson).
135139

136140
register_autoscaled_task(Config) ->
141+
RabbitmqDefaultUser = ?config(rabbitmq_default_user, Config),
142+
RabbitmqDefaultPass = ?config(rabbitmq_default_pass, Config),
137143
RabbitmqConf = string:join([
144+
"default_user = " ++ RabbitmqDefaultUser,
145+
"default_pass = " ++ RabbitmqDefaultPass,
138146
"cluster_formation.peer_discovery_backend = aws",
139147
"cluster_formation.aws.use_autoscaling_group = true",
140148
""
@@ -157,11 +165,7 @@ task_json(Config, RabbitmqConf) ->
157165
RabbitContainerDef1 =
158166
RabbitContainerDef#{
159167
<<"image">> := list_to_binary(RabbitmqImage),
160-
<<"environment">> := [#{<<"name">> => <<"RABBITMQ_DEFAULT_USER">>,
161-
<<"value">> => list_to_binary(RabbitmqDefaultUser)},
162-
#{<<"name">> => <<"RABBITMQ_DEFAULT_PASS">>,
163-
<<"value">> => list_to_binary(RabbitmqDefaultPass)},
164-
#{<<"name">> => <<"RABBITMQ_ERLANG_COOKIE">>,
168+
<<"environment">> := [#{<<"name">> => <<"RABBITMQ_ERLANG_COOKIE">>,
165169
<<"value">> => list_to_binary(RabbitmqErlangCookie)}]
166170
},
167171
SidecarContainerDef1 =

deps/rabbitmq_peer_discovery_aws/test/integration_SUITE_data/task_definition.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@
2121
],
2222
"essential": true,
2323
"environment": [
24-
{
25-
"name": "RABBITMQ_DEFAULT_USER",
26-
"value": "PLACEHOLDER"
27-
},
28-
{
29-
"name": "RABBITMQ_DEFAULT_PASS",
30-
"value": "PLACEHOLDER"
31-
},
3224
{
3325
"name": "RABBITMQ_ERLANG_COOKIE",
3426
"value": "PLACEHOLDER"
Lines changed: 8 additions & 0 deletions
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

packaging/docker-image/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ VOLUME $RABBITMQ_DATA_DIR
250250
# https://docs.docker.com/samples/library/ubuntu/#locales
251251
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
252252

253+
COPY --chown=rabbitmq:rabbitmq 10-default-guest-user.conf /etc/rabbitmq/conf.d/
253254
COPY docker-entrypoint.sh /usr/local/bin/
254255
ENTRYPOINT ["docker-entrypoint.sh"]
255256

0 commit comments

Comments
 (0)