Skip to content

Commit 98a0a46

Browse files
[bitnami/mariadb] Release mariadb-11.7.2-debian-12-r1
Signed-off-by: Alexandre Cavanna <[email protected]>
1 parent 0804c52 commit 98a0a46

26 files changed

+4743
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Copyright Broadcom, Inc. All Rights Reserved.
2+
# SPDX-License-Identifier: APACHE-2.0
3+
4+
FROM docker.io/bitnami/minideb:bookworm
5+
6+
ARG DOWNLOADS_URL="downloads.bitnami.com/files/stacksmith"
7+
ARG TARGETARCH
8+
9+
LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \
10+
org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
11+
org.opencontainers.image.created="2025-04-15T02:00:13Z" \
12+
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
13+
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/mariadb/README.md" \
14+
org.opencontainers.image.ref.name="11.7.2-debian-12-r1" \
15+
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/mariadb" \
16+
org.opencontainers.image.title="mariadb" \
17+
org.opencontainers.image.vendor="Broadcom, Inc." \
18+
org.opencontainers.image.version="11.7.2"
19+
20+
ENV HOME="/" \
21+
OS_ARCH="${TARGETARCH:-amd64}" \
22+
OS_FLAVOUR="debian-12" \
23+
OS_NAME="linux"
24+
25+
COPY prebuildfs /
26+
SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"]
27+
# Install required system packages and dependencies
28+
RUN install_packages ca-certificates curl libaio1 libaudit1 libcap-ng0 libcrypt1 libgcc-s1 libicu72 liblzma5 libncurses6 libpam0g libssl3 libstdc++6 libtinfo6 libxml2 procps psmisc zlib1g
29+
RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ || exit 1 ; \
30+
COMPONENTS=( \
31+
"ini-file-1.4.7-15-linux-${OS_ARCH}-debian-12" \
32+
"mariadb-11.7.2-2-linux-${OS_ARCH}-debian-12" \
33+
) ; \
34+
for COMPONENT in "${COMPONENTS[@]}"; do \
35+
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
36+
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz" -O ; \
37+
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz.sha256" -O ; \
38+
fi ; \
39+
sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \
40+
tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner ; \
41+
rm -rf "${COMPONENT}".tar.gz{,.sha256} ; \
42+
done
43+
RUN apt-get autoremove --purge -y curl && \
44+
apt-get update && apt-get upgrade -y && \
45+
apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
46+
RUN chmod g+rwX /opt/bitnami
47+
RUN find / -perm /6000 -type f -exec chmod a-s {} \; || true
48+
RUN mkdir /docker-entrypoint-initdb.d
49+
50+
COPY rootfs /
51+
RUN /opt/bitnami/scripts/mariadb/postunpack.sh
52+
ENV APP_VERSION="11.7.2" \
53+
BITNAMI_APP_NAME="mariadb" \
54+
PATH="/opt/bitnami/common/bin:/opt/bitnami/common/sbin:/opt/bitnami/mariadb/bin:/opt/bitnami/mariadb/sbin:$PATH"
55+
56+
EXPOSE 3306
57+
58+
USER 1001
59+
ENTRYPOINT [ "/opt/bitnami/scripts/mariadb/entrypoint.sh" ]
60+
CMD [ "/opt/bitnami/scripts/mariadb/run.sh" ]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright Broadcom, Inc. All Rights Reserved.
2+
# SPDX-License-Identifier: APACHE-2.0
3+
4+
services:
5+
mariadb:
6+
image: docker.io/bitnami/mariadb:11.7
7+
ports:
8+
- '3306:3306'
9+
volumes:
10+
- 'mariadb_data:/bitnami/mariadb'
11+
environment:
12+
# ALLOW_EMPTY_PASSWORD is recommended only for development.
13+
- ALLOW_EMPTY_PASSWORD=yes
14+
healthcheck:
15+
test: ['CMD', '/opt/bitnami/scripts/mariadb/healthcheck.sh']
16+
interval: 15s
17+
timeout: 5s
18+
retries: 6
19+
20+
volumes:
21+
mariadb_data:
22+
driver: local
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"ini-file": {
3+
"arch": "amd64",
4+
"distro": "debian-12",
5+
"type": "NAMI",
6+
"version": "1.4.7-15"
7+
},
8+
"mariadb": {
9+
"arch": "amd64",
10+
"distro": "debian-12",
11+
"type": "NAMI",
12+
"version": "11.7.2-1"
13+
}
14+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Bitnami containers ship with software bundles. You can find the licenses under:
2+
/opt/bitnami/[name-of-bundle]/licenses/[bundle-version].txt
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/bin/bash
2+
# Copyright Broadcom, Inc. All Rights Reserved.
3+
# SPDX-License-Identifier: APACHE-2.0
4+
#
5+
# Bitnami custom library
6+
7+
# shellcheck disable=SC1091
8+
9+
# Load Generic Libraries
10+
. /opt/bitnami/scripts/liblog.sh
11+
12+
# Constants
13+
BOLD='\033[1m'
14+
15+
# Functions
16+
17+
########################
18+
# Print the welcome page
19+
# Globals:
20+
# DISABLE_WELCOME_MESSAGE
21+
# BITNAMI_APP_NAME
22+
# Arguments:
23+
# None
24+
# Returns:
25+
# None
26+
#########################
27+
print_welcome_page() {
28+
if [[ -z "${DISABLE_WELCOME_MESSAGE:-}" ]]; then
29+
if [[ -n "$BITNAMI_APP_NAME" ]]; then
30+
print_image_welcome_page
31+
fi
32+
fi
33+
}
34+
35+
########################
36+
# Print the welcome page for a Bitnami Docker image
37+
# Globals:
38+
# BITNAMI_APP_NAME
39+
# Arguments:
40+
# None
41+
# Returns:
42+
# None
43+
#########################
44+
print_image_welcome_page() {
45+
local github_url="https://github.com/bitnami/containers"
46+
47+
info ""
48+
info "${BOLD}Welcome to the Bitnami ${BITNAMI_APP_NAME} container${RESET}"
49+
info "Subscribe to project updates by watching ${BOLD}${github_url}${RESET}"
50+
info "Did you know there are enterprise versions of the Bitnami catalog? For enhanced secure software supply chain features, unlimited pulls from Docker, LTS support, or application customization, see Bitnami Premium or Tanzu Application Catalog. See https://www.arrow.com/globalecs/na/vendors/bitnami/ for more information."
51+
info ""
52+
}
53+
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
#!/bin/bash
2+
# Copyright Broadcom, Inc. All Rights Reserved.
3+
# SPDX-License-Identifier: APACHE-2.0
4+
#
5+
# Library for managing files
6+
7+
# shellcheck disable=SC1091
8+
9+
# Load Generic Libraries
10+
. /opt/bitnami/scripts/libos.sh
11+
12+
# Functions
13+
14+
########################
15+
# Replace a regex-matching string in a file
16+
# Arguments:
17+
# $1 - filename
18+
# $2 - match regex
19+
# $3 - substitute regex
20+
# $4 - use POSIX regex. Default: true
21+
# Returns:
22+
# None
23+
#########################
24+
replace_in_file() {
25+
local filename="${1:?filename is required}"
26+
local match_regex="${2:?match regex is required}"
27+
local substitute_regex="${3:?substitute regex is required}"
28+
local posix_regex=${4:-true}
29+
30+
local result
31+
32+
# We should avoid using 'sed in-place' substitutions
33+
# 1) They are not compatible with files mounted from ConfigMap(s)
34+
# 2) We found incompatibility issues with Debian10 and "in-place" substitutions
35+
local -r del=$'\001' # Use a non-printable character as a 'sed' delimiter to avoid issues
36+
if [[ $posix_regex = true ]]; then
37+
result="$(sed -E "s${del}${match_regex}${del}${substitute_regex}${del}g" "$filename")"
38+
else
39+
result="$(sed "s${del}${match_regex}${del}${substitute_regex}${del}g" "$filename")"
40+
fi
41+
echo "$result" > "$filename"
42+
}
43+
44+
########################
45+
# Replace a regex-matching multiline string in a file
46+
# Arguments:
47+
# $1 - filename
48+
# $2 - match regex
49+
# $3 - substitute regex
50+
# Returns:
51+
# None
52+
#########################
53+
replace_in_file_multiline() {
54+
local filename="${1:?filename is required}"
55+
local match_regex="${2:?match regex is required}"
56+
local substitute_regex="${3:?substitute regex is required}"
57+
58+
local result
59+
local -r del=$'\001' # Use a non-printable character as a 'sed' delimiter to avoid issues
60+
result="$(perl -pe "BEGIN{undef $/;} s${del}${match_regex}${del}${substitute_regex}${del}sg" "$filename")"
61+
echo "$result" > "$filename"
62+
}
63+
64+
########################
65+
# Remove a line in a file based on a regex
66+
# Arguments:
67+
# $1 - filename
68+
# $2 - match regex
69+
# $3 - use POSIX regex. Default: true
70+
# Returns:
71+
# None
72+
#########################
73+
remove_in_file() {
74+
local filename="${1:?filename is required}"
75+
local match_regex="${2:?match regex is required}"
76+
local posix_regex=${3:-true}
77+
local result
78+
79+
# We should avoid using 'sed in-place' substitutions
80+
# 1) They are not compatible with files mounted from ConfigMap(s)
81+
# 2) We found incompatibility issues with Debian10 and "in-place" substitutions
82+
if [[ $posix_regex = true ]]; then
83+
result="$(sed -E "/$match_regex/d" "$filename")"
84+
else
85+
result="$(sed "/$match_regex/d" "$filename")"
86+
fi
87+
echo "$result" > "$filename"
88+
}
89+
90+
########################
91+
# Appends text after the last line matching a pattern
92+
# Arguments:
93+
# $1 - file
94+
# $2 - match regex
95+
# $3 - contents to add
96+
# Returns:
97+
# None
98+
#########################
99+
append_file_after_last_match() {
100+
local file="${1:?missing file}"
101+
local match_regex="${2:?missing pattern}"
102+
local value="${3:?missing value}"
103+
104+
# We read the file in reverse, replace the first match (0,/pattern/s) and then reverse the results again
105+
result="$(tac "$file" | sed -E "0,/($match_regex)/s||${value}\n\1|" | tac)"
106+
echo "$result" > "$file"
107+
}
108+
109+
########################
110+
# Wait until certain entry is present in a log file
111+
# Arguments:
112+
# $1 - entry to look for
113+
# $2 - log file
114+
# $3 - max retries. Default: 12
115+
# $4 - sleep between retries (in seconds). Default: 5
116+
# Returns:
117+
# Boolean
118+
#########################
119+
wait_for_log_entry() {
120+
local -r entry="${1:-missing entry}"
121+
local -r log_file="${2:-missing log file}"
122+
local -r retries="${3:-12}"
123+
local -r interval_time="${4:-5}"
124+
local attempt=0
125+
126+
check_log_file_for_entry() {
127+
if ! grep -qE "$entry" "$log_file"; then
128+
debug "Entry \"${entry}\" still not present in ${log_file} (attempt $((++attempt))/${retries})"
129+
return 1
130+
fi
131+
}
132+
debug "Checking that ${log_file} log file contains entry \"${entry}\""
133+
if retry_while check_log_file_for_entry "$retries" "$interval_time"; then
134+
debug "Found entry \"${entry}\" in ${log_file}"
135+
true
136+
else
137+
error "Could not find entry \"${entry}\" in ${log_file} after ${retries} retries"
138+
debug_execute cat "$log_file"
139+
return 1
140+
fi
141+
}

0 commit comments

Comments
 (0)