Skip to content

Commit 6f0223b

Browse files
committed
Add Rust-based rabbitmqadmin-ng with Python fallback
The RabbitMQ management images now include the Rust-based `rabbitmqadmin-ng` CLI tool when possible, with automatic fallback to the Python version on architectures where Rust compilation fails. This change adds a two-stage build to `Dockerfile-management.template`: - **Builder stage**: Attempts to compile `rabbitmqadmin-ng` from source using Rust toolchain installed via `rustup-init.sh`. The build links against the custom OpenSSL installation using `OPENSSL_DIR` and `RUSTFLAGS` with proper rpath configuration. - **Final stage**: Copies the Rust binary if build succeeded, otherwise falls back to the Python script from the RabbitMQ management plugin. Python is only installed when using the fallback. The `versions.sh` script fetches the latest `rabbitmqadmin-ng` release tag from the GitHub API and calculates SHA256 checksums for both the source archive and Rust installer. These values are stored in `versions.json` and templated into the generated management Dockerfiles. This approach ensures smaller images on architectures with good Rust support (amd64, arm64v8) while maintaining compatibility with all supported architectures through automatic Python fallback.
1 parent c75d7c6 commit 6f0223b

File tree

23 files changed

+479
-66
lines changed

23 files changed

+479
-66
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
*.tar.gz
2+
*.zip
3+
rustup-init.sh
14
.jq-template.awk

3.13/alpine/Dockerfile

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.13/alpine/management/Dockerfile

Lines changed: 43 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.13/ubuntu/Dockerfile

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.13/ubuntu/management/Dockerfile

Lines changed: 46 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

4.0/alpine/Dockerfile

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

4.0/alpine/management/Dockerfile

Lines changed: 43 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

4.0/ubuntu/Dockerfile

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

4.0/ubuntu/management/Dockerfile

Lines changed: 46 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

4.1/alpine/Dockerfile

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)