Skip to content

Bring the docker image up to date with the docker-library version #3189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions deps/rabbitmq_peer_discovery_aws/test/integration_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ cluster_was_formed(Config) ->
?assertEqual(lists:sort(N2Nodes), lists:sort(N3Nodes)).

register_tagged_task(Config) ->
RabbitmqDefaultUser = ?config(rabbitmq_default_user, Config),
RabbitmqDefaultPass = ?config(rabbitmq_default_pass, Config),
RabbitmqConf = string:join([
"default_user = " ++ RabbitmqDefaultUser,
"default_pass = " ++ RabbitmqDefaultPass,
"cluster_formation.peer_discovery_backend = aws",
"cluster_formation.aws.instance_tags.service = rabbitmq",
""
Expand All @@ -133,7 +137,11 @@ register_tagged_task(Config) ->
aws_ecs_util:register_task(Config, TaskJson).

register_autoscaled_task(Config) ->
RabbitmqDefaultUser = ?config(rabbitmq_default_user, Config),
RabbitmqDefaultPass = ?config(rabbitmq_default_pass, Config),
RabbitmqConf = string:join([
"default_user = " ++ RabbitmqDefaultUser,
"default_pass = " ++ RabbitmqDefaultPass,
"cluster_formation.peer_discovery_backend = aws",
"cluster_formation.aws.use_autoscaling_group = true",
""
Expand All @@ -156,11 +164,7 @@ task_json(Config, RabbitmqConf) ->
RabbitContainerDef1 =
RabbitContainerDef#{
<<"image">> := list_to_binary(RabbitmqImage),
<<"environment">> := [#{<<"name">> => <<"RABBITMQ_DEFAULT_USER">>,
<<"value">> => list_to_binary(RabbitmqDefaultUser)},
#{<<"name">> => <<"RABBITMQ_DEFAULT_PASS">>,
<<"value">> => list_to_binary(RabbitmqDefaultPass)},
#{<<"name">> => <<"RABBITMQ_ERLANG_COOKIE">>,
<<"environment">> := [#{<<"name">> => <<"RABBITMQ_ERLANG_COOKIE">>,
<<"value">> => list_to_binary(RabbitmqErlangCookie)}]
},
SidecarContainerDef1 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@
],
"essential": true,
"environment": [
{
"name": "RABBITMQ_DEFAULT_USER",
"value": "PLACEHOLDER"
},
{
"name": "RABBITMQ_DEFAULT_PASS",
"value": "PLACEHOLDER"
},
{
"name": "RABBITMQ_ERLANG_COOKIE",
"value": "PLACEHOLDER"
Expand Down
8 changes: 8 additions & 0 deletions packaging/docker-image/10-default-guest-user.conf
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions packaging/docker-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,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"]

Expand Down
2 changes: 1 addition & 1 deletion packaging/docker-image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ else \
fi)
endif

ifeq ($(filter-out all dist push,$(MAKECMDGOALS)),)
ifeq ($(filter-out all dist push clean,$(MAKECMDGOALS)),)
GENERIC_UNIX_ARCHIVE ?= $(wildcard $(PACKAGES_DIR)/rabbitmq-server-generic-unix-$(PROJECT_VERSION).tar.xz)

ifeq ($(GENERIC_UNIX_ARCHIVE),)
Expand Down
Loading