Skip to content
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

Use Ubuntu 22.04 for RabbitMQ 3 #644

Merged
merged 1 commit into from
Jun 20, 2023
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
4 changes: 2 additions & 2 deletions 3.10/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions 3.10/ubuntu/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 3.11/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions 3.11/ubuntu/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 3.12/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions 3.12/ubuntu/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 3.9/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions 3.9/ubuntu/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Alpine Linux is not officially supported by the RabbitMQ team -- use at your own risk!
FROM alpine:3.18 as build-base
FROM alpine:{{ .alpine.version }} as build-base

RUN apk add --no-cache \
build-base \
Expand Down Expand Up @@ -191,7 +191,7 @@ RUN set -eux; \
# Check that Erlang/OTP crypto & ssl were compiled against OpenSSL correctly
RUN erl -noshell -eval 'ok = crypto:start(), ok = io:format("~p~n~n~p~n~n", [crypto:supports(), ssl:versions()]), init:stop().'

FROM alpine:3.18
FROM alpine:{{ .alpine.version }}

COPY --from=erlang-builder /usr/local/bin/ /usr/local/bin/
COPY --from=erlang-builder /usr/local/etc/ssl/ /usr/local/etc/ssl/
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-ubuntu.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The official Canonical Ubuntu Focal image is ideal from a security perspective,
# especially for the enterprises that we, the RabbitMQ team, have to deal with
FROM ubuntu:20.04 as build-base
FROM ubuntu:{{ .ubuntu.version }} as build-base

RUN set -eux; \
apt-get update; \
Expand Down Expand Up @@ -191,7 +191,7 @@ RUN set -eux; \
# Check that Erlang/OTP crypto & ssl were compiled against OpenSSL correctly
RUN erl -noshell -eval 'ok = crypto:start(), ok = io:format("~p~n~n~p~n~n", [crypto:supports(), ssl:versions()]), init:stop().'

FROM ubuntu:20.04
FROM ubuntu:{{ .ubuntu.version }}

COPY --from=erlang-builder /usr/local/bin/ /usr/local/bin/
COPY --from=erlang-builder /usr/local/etc/ssl/ /usr/local/etc/ssl/
Expand Down
40 changes: 32 additions & 8 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,73 @@
{
"3.10": {
"alpine": {
"version": "3.18"
},
"openssl": {
"sha256": "eb1ab04781474360f77c318ab89d8c5a03abc38e63d65a603cabbf1b00a1dc90",
"version": "3.0.9"
"sha256": "b3aa61334233b852b63ddb048df181177c2c659eb9d4376008118f9c08d07674",
"version": "3.1.1"
},
"otp": {
"sha256": "83a36f3d90deef36adb615bbfb46cd327f0b76b7668e1f7f253fd66b4ae24518",
"version": "25.3.2.2"
},
"ubuntu": {
"version": "22.04"
},
"version": "3.10.24"
},
"3.10-rc": null,
"3.11": {
"alpine": {
"version": "3.18"
},
"openssl": {
"sha256": "eb1ab04781474360f77c318ab89d8c5a03abc38e63d65a603cabbf1b00a1dc90",
"version": "3.0.9"
"sha256": "b3aa61334233b852b63ddb048df181177c2c659eb9d4376008118f9c08d07674",
"version": "3.1.1"
},
"otp": {
"sha256": "83a36f3d90deef36adb615bbfb46cd327f0b76b7668e1f7f253fd66b4ae24518",
"version": "25.3.2.2"
},
"ubuntu": {
"version": "22.04"
},
"version": "3.11.18"
},
"3.11-rc": null,
"3.12": {
"alpine": {
"version": "3.18"
},
"openssl": {
"sha256": "eb1ab04781474360f77c318ab89d8c5a03abc38e63d65a603cabbf1b00a1dc90",
"version": "3.0.9"
"sha256": "b3aa61334233b852b63ddb048df181177c2c659eb9d4376008118f9c08d07674",
"version": "3.1.1"
},
"otp": {
"sha256": "83a36f3d90deef36adb615bbfb46cd327f0b76b7668e1f7f253fd66b4ae24518",
"version": "25.3.2.2"
},
"ubuntu": {
"version": "22.04"
},
"version": "3.12.0"
},
"3.12-rc": null,
"3.9": {
"alpine": {
"version": "3.18"
},
"openssl": {
"sha256": "eb1ab04781474360f77c318ab89d8c5a03abc38e63d65a603cabbf1b00a1dc90",
"version": "3.0.9"
"sha256": "b3aa61334233b852b63ddb048df181177c2c659eb9d4376008118f9c08d07674",
"version": "3.1.1"
},
"otp": {
"sha256": "83a36f3d90deef36adb615bbfb46cd327f0b76b7668e1f7f253fd66b4ae24518",
"version": "25.3.2.2"
},
"ubuntu": {
"version": "22.04"
},
"version": "3.9.29"
},
"3.9-rc": null
Expand Down
36 changes: 31 additions & 5 deletions versions.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
#!/usr/bin/env bash
set -Eeuo pipefail

declare -A alpineVersions=(
[3.9]='3.18'
[3.10]='3.18'
[3.11]='3.18'
[3.12]='3.18'
)

declare -A ubuntuVersions=(
[3.9]='22.04'
[3.10]='22.04'
[3.11]='22.04'
[3.12]='22.04'
)

# https://www.rabbitmq.com/which-erlang.html ("Maximum supported Erlang/OTP")
declare -A otpMajors=(
[3.9]='25'
Expand All @@ -12,10 +26,10 @@ declare -A otpMajors=(
# https://www.openssl.org/policies/releasestrat.html
# https://www.openssl.org/source/
declare -A opensslMajors=(
[3.9]='3.0'
[3.10]='3.0'
[3.11]='3.0'
[3.12]='3.0'
[3.9]='3.1'
[3.10]='3.1'
[3.11]='3.1'
[3.12]='3.1'
)

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
Expand Down Expand Up @@ -130,7 +144,13 @@ for version in "${versions[@]}"; do
# OpenSSL 3.0.5's sha256 file starts with a single space 😬
opensslSourceSha256="${opensslSourceSha256# }"

echo "$version: $fullVersion (otp $otpVersion, openssl $opensslVersion)"
alpineVersion="${alpineVersions[$rcVersion]}"
export alpineVersion

ubuntuVersion="${ubuntuVersions[$rcVersion]}"
export ubuntuVersion

echo "$version: $fullVersion (otp $otpVersion, openssl $opensslVersion, alpine, $alpineVersion, ubuntu $ubuntuVersion)"

json="$(
jq <<<"$json" -c '
Expand All @@ -144,6 +164,12 @@ for version in "${versions[@]}"; do
version: env.otpVersion,
sha256: env.otpSourceSha256,
},
alpine: {
version: env.alpineVersion
},
ubuntu: {
version: env.ubuntuVersion
},
}
'
)"
Expand Down