Skip to content

Commit 9effc7f

Browse files
Update to 3.8.5, Erlang/OTP 23.0.2, OpenSSL 1.1.1g
1 parent a5cccf2 commit 9effc7f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

3.8/alpine/docker-entrypoint.sh

+10
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,16 @@ oldConfigFile="$configBase.config"
202202
newConfigFile="$configBase.conf"
203203

204204
shouldWriteConfig="$haveConfig"
205+
if [ -n "$shouldWriteConfig" ] && ! touch "$newConfigFile"; then
206+
# config file exists but it isn't writeable (likely read-only mount, such as Kubernetes configMap)
207+
export RABBITMQ_CONFIG_FILE='/tmp/rabbitmq.conf'
208+
cp "$newConfigFile" "$RABBITMQ_CONFIG_FILE"
209+
echo >&2
210+
echo >&2 "WARNING: '$newConfigFile' is not writable, but environment variables have been provided which request that we write to it"
211+
echo >&2 " We have copied it to '$RABBITMQ_CONFIG_FILE' so it can be amended to work around the problem, but it is recommended that the read-only source file should be modified and the environment variables removed instead."
212+
echo >&2
213+
newConfigFile="$RABBITMQ_CONFIG_FILE"
214+
fi
205215
if [ -n "$shouldWriteConfig" ] && [ -f "$oldConfigFile" ]; then
206216
{
207217
echo "error: Docker configuration environment variables specified, but old-style (Erlang syntax) configuration file '$oldConfigFile' exists"

3.8/ubuntu/docker-entrypoint.sh

+10
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,16 @@ oldConfigFile="$configBase.config"
202202
newConfigFile="$configBase.conf"
203203

204204
shouldWriteConfig="$haveConfig"
205+
if [ -n "$shouldWriteConfig" ] && ! touch "$newConfigFile"; then
206+
# config file exists but it isn't writeable (likely read-only mount, such as Kubernetes configMap)
207+
export RABBITMQ_CONFIG_FILE='/tmp/rabbitmq.conf'
208+
cp "$newConfigFile" "$RABBITMQ_CONFIG_FILE"
209+
echo >&2
210+
echo >&2 "WARNING: '$newConfigFile' is not writable, but environment variables have been provided which request that we write to it"
211+
echo >&2 " We have copied it to '$RABBITMQ_CONFIG_FILE' so it can be amended to work around the problem, but it is recommended that the read-only source file should be modified and the environment variables removed instead."
212+
echo >&2
213+
newConfigFile="$RABBITMQ_CONFIG_FILE"
214+
fi
205215
if [ -n "$shouldWriteConfig" ] && [ -f "$oldConfigFile" ]; then
206216
{
207217
echo "error: Docker configuration environment variables specified, but old-style (Erlang syntax) configuration file '$oldConfigFile' exists"

0 commit comments

Comments
 (0)