Skip to content

Introduce a variant without the VOLUME declaration #416

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

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 0 additions & 2 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,6 @@ RUN ln -sf /opt/rabbitmq/plugins /plugins

# set home so that any `--user` knows where to put the erlang cookie
ENV HOME $RABBITMQ_DATA_DIR
# Hint that the data (a.k.a. home dir) dir should be separate volume
VOLUME $RABBITMQ_DATA_DIR

# warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)
# Setting all environment variables that control language preferences, behaviour differs - https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html#The-LANGUAGE-variable
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile-management.template
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ RUN set -eux; \
rabbitmqadmin --version

EXPOSE 15671 15672

# Hint that the data (a.k.a. home dir) dir should be separate volume
VOLUME $RABBITMQ_DATA_DIR
2 changes: 0 additions & 2 deletions Dockerfile-ubuntu.template
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ RUN ln -sf /opt/rabbitmq/plugins /plugins

# set home so that any `--user` knows where to put the erlang cookie
ENV HOME $RABBITMQ_DATA_DIR
# Hint that the data (a.k.a. home dir) dir should be separate volume
VOLUME $RABBITMQ_DATA_DIR

# warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)
# Setting all environment variables that control language preferences, behaviour differs - https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html#The-LANGUAGE-variable
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile-volume.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM %%FROM%%

# Hint that the data (a.k.a. home dir) dir should be separate volume
VOLUME $RABBITMQ_DATA_DIR
11 changes: 8 additions & 3 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,16 @@ for version in "${versions[@]}"; do
-e "s!%%OTP_SOURCE_SHA256%%!$otpSourceSha256!g" \
-e "s!%%RABBITMQ_VERSION%%!$fullVersion!g" \
"Dockerfile-$variant.template" \
> "$version/$variant/Dockerfile"
> "$version/$variant/volumeless/Dockerfile"

cp -a docker-entrypoint.sh "$version/$variant/volumeless/"

cp -a docker-entrypoint.sh "$version/$variant/"
standardFrom="rabbitmq:$version-volumeless"
sed -e "s!%%FROM%%!$standardFrom!g" \
Dockerfile-volume.template \
> "$version/$variant/Dockerfile"

managementFrom="rabbitmq:$version"
managementFrom="rabbitmq:$version-volumeless"
installPython='apt-get update; apt-get install -y --no-install-recommends '"$python"'; rm -rf /var/lib/apt/lists/*'
if [ "$variant" = 'alpine' ]; then
managementFrom+='-alpine'
Expand Down