Skip to content

Commit 98e0155

Browse files
author
Bitnami Bot
authored
[bitnami/laravel] Release laravel-12.0.2-debian-12-r0 (#78652)
Signed-off-by: Bitnami Bot <bitnami-bot@vmware.com>
1 parent c365ec3 commit 98e0155

38 files changed

+3987
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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-03-10T09:18:35Z" \
12+
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
13+
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/laravel/README.md" \
14+
org.opencontainers.image.licenses="Apache-2.0" \
15+
org.opencontainers.image.ref.name="12.0.2-debian-12-r0" \
16+
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/laravel" \
17+
org.opencontainers.image.title="laravel" \
18+
org.opencontainers.image.vendor="Broadcom, Inc." \
19+
org.opencontainers.image.version="12.0.2"
20+
21+
ENV 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 libbrotli1 libbsd0 libbz2-1.0 libcom-err2 libcurl4 libexpat1 libffi8 libfftw3-double3 libfontconfig1 libfreetype6 libgcc-s1 libgcrypt20 libglib2.0-0 libgmp10 libgnutls30 libgomp1 libgpg-error0 libgssapi-krb5-2 libhashkit2 libhogweed6 libicu72 libidn2-0 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblcms2-2 libldap-2.5-0 liblqr-1-0 libltdl7 liblzma5 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmd0 libmemcached11 libncursesw6 libnettle8 libnghttp2-14 libonig5 libp11-kit0 libpcre2-8-0 libpng16-16 libpq5 libpsl5 libreadline8 librtmp1 libsasl2-2 libsodium23 libsqlite3-0 libssh2-1 libssl3 libstdc++6 libsybdb5 libtasn1-6 libtidy5deb1 libtinfo6 libunistring2 libwebp7 libx11-6 libxau6 libxcb1 libxdmcp6 libxext6 libxml2 libxslt1.1 libzip4 libzstd1 procps sqlite3 sudo zlib1g
29+
RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \
30+
COMPONENTS=( \
31+
"python-3.13.2-8-linux-${OS_ARCH}-debian-12" \
32+
"wait-for-port-1.0.8-14-linux-${OS_ARCH}-debian-12" \
33+
"php-8.4.4-5-linux-${OS_ARCH}-debian-12" \
34+
"node-22.14.0-2-linux-${OS_ARCH}-debian-12" \
35+
"laravel-12.0.2-0-linux-${OS_ARCH}-debian-12" \
36+
) ; \
37+
for COMPONENT in "${COMPONENTS[@]}"; do \
38+
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
39+
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz" -O ; \
40+
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz.sha256" -O ; \
41+
fi ; \
42+
sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \
43+
tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' ; \
44+
rm -rf "${COMPONENT}".tar.gz{,.sha256} ; \
45+
done
46+
RUN apt-get update && apt-get upgrade -y && \
47+
apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
48+
RUN /build/bitnami-user.sh
49+
RUN find / -perm /6000 -type f -exec chmod a-s {} \; || true
50+
51+
COPY rootfs /
52+
RUN /opt/bitnami/scripts/laravel/postunpack.sh
53+
RUN /opt/bitnami/scripts/php/postunpack.sh
54+
ENV APP_VERSION="12.0.2" \
55+
BITNAMI_APP_NAME="laravel" \
56+
NODE_PATH="/opt/bitnami/node/lib/node_modules" \
57+
PATH="/opt/bitnami/python/bin:/opt/bitnami/common/bin:/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/node/bin:$PATH" \
58+
PHP_ENABLE_OPCACHE="0"
59+
60+
EXPOSE 3000 8000
61+
62+
WORKDIR /app
63+
ENTRYPOINT [ "/opt/bitnami/scripts/laravel/entrypoint.sh" ]
64+
CMD [ "/opt/bitnami/scripts/laravel/run.sh" ]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
# Copyright Broadcom, Inc. All Rights Reserved.
3+
# SPDX-License-Identifier: APACHE-2.0
4+
5+
useradd -ms /bin/bash bitnami
6+
mkdir -p /opt/bitnami
7+
sed -i -e 's/\s*Defaults\s*secure_path\s*=/# Defaults secure_path=/' /etc/sudoers
8+
echo 'bitnami ALL=NOPASSWD: ALL' >> /etc/sudoers
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"laravel": {
3+
"arch": "amd64",
4+
"distro": "debian-12",
5+
"type": "NAMI",
6+
"version": "12.0.2-0"
7+
},
8+
"node": {
9+
"arch": "amd64",
10+
"distro": "debian-12",
11+
"type": "NAMI",
12+
"version": "22.14.0-2"
13+
},
14+
"php": {
15+
"arch": "amd64",
16+
"distro": "debian-12",
17+
"type": "NAMI",
18+
"version": "8.4.4-5"
19+
},
20+
"python": {
21+
"arch": "amd64",
22+
"distro": "debian-12",
23+
"type": "NAMI",
24+
"version": "3.13.2-8"
25+
},
26+
"wait-for-port": {
27+
"arch": "amd64",
28+
"distro": "debian-12",
29+
"type": "NAMI",
30+
"version": "1.0.8-14"
31+
}
32+
}
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)