10.7.0-debian-10-r26 release

This commit is contained in:
Bitnami Bot 2021-05-07 17:40:55 +00:00
parent 2f25da6615
commit 8b4a7dc493
7 changed files with 72 additions and 72 deletions

View File

@ -32,7 +32,7 @@ ENV ALLOW_EMPTY_PASSWORD="no" \
APACHE_HTTPS_PORT_NUMBER="" \
APACHE_HTTP_PORT_NUMBER="" \
BITNAMI_APP_NAME="owncloud" \
BITNAMI_IMAGE_VERSION="10.7.0-debian-10-r25" \
BITNAMI_IMAGE_VERSION="10.7.0-debian-10-r26" \
MARIADB_HOST="mariadb" \
MARIADB_PORT_NUMBER="3306" \
MARIADB_ROOT_PASSWORD="" \

View File

@ -181,7 +181,7 @@ validate_ipv4() {
local stat=1
if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
read -r -a ip_array <<< "$(tr '.' ' ' <<< "$ip")"
read -r -a ip_array <<< "$(tr '.' ' ' <<< "$ip")"
[[ ${ip_array[0]} -le 255 && ${ip_array[1]} -le 255 \
&& ${ip_array[2]} -le 255 && ${ip_array[3]} -le 255 ]]
stat=$?

View File

@ -180,6 +180,7 @@ web_server_reload() {
# --apache-move-htaccess - Move .htaccess files to a common place so they can be loaded during Apache startup
# NGINX-specific flags:
# --nginx-additional-configuration - Additional server block configuration (no default)
# --nginx-external-configuration - Configuration external to server block (no default)
# Returns:
# true if the configuration was enabled, false otherwise
########################
@ -220,7 +221,8 @@ ensure_web_server_app_configuration_exists() {
;;
# Specific NGINX flags
--nginx-additional-configuration)
--nginx-additional-configuration \
| --nginx-external-configuration)
nginx_args+=("${1//nginx-/}" "${2:?missing value}")
shift
;;

View File

@ -19,8 +19,42 @@ apache_validate
# Ensure Apache daemon user exists when running as 'root'
am_i_root && ensure_user_exists "$APACHE_DAEMON_USER" --group "$APACHE_DAEMON_GROUP"
# Ensure Apache is initialized
apache_initialize
# Copy vhosts files
if ! is_dir_empty "/vhosts"; then
info "Found mounted virtual hosts in '/vhosts'. Copying them to '${APACHE_BASE_DIR}/conf/vhosts'"
cp -Lr "/vhosts/." "${APACHE_VHOSTS_DIR}"
fi
# Mount certificate files
if ! is_dir_empty "${APACHE_BASE_DIR}/certs"; then
warn "The directory '${APACHE_BASE_DIR}/certs' was externally mounted. This is a legacy configuration and will be deprecated soon. Please mount certificate files at '/certs' instead. Find an example at: https://github.com/bitnami/bitnami-docker-apache#using-custom-ssl-certificates"
warn "Restoring certificates at '${APACHE_BASE_DIR}/certs' to '${APACHE_CONF_DIR}/bitnami/certs'"
rm -rf "${APACHE_CONF_DIR}/bitnami/certs"
ln -sf "${APACHE_BASE_DIR}/certs" "${APACHE_CONF_DIR}/bitnami/certs"
elif ! is_dir_empty "/certs"; then
info "Mounting certificates files from '/certs'"
rm -rf "${APACHE_CONF_DIR}/bitnami/certs"
ln -sf "/certs" "${APACHE_CONF_DIR}/bitnami/certs"
fi
# Mount application files
if ! is_dir_empty "/app"; then
info "Mounting application files from '/app'"
rm -rf "$APACHE_HTDOCS_DIR"
ln -sf "/app" "$APACHE_HTDOCS_DIR"
fi
# Restore persisted configuration files (deprecated)
if ! is_dir_empty "/bitnami/apache/conf"; then
warn "The directory '/bitnami/apache/conf' was externally mounted. This is a legacy configuration and will be deprecated soon. Please mount certificate files at '${APACHE_CONF_DIR}' instead. Find an example at: https://github.com/bitnami/bitnami-docker-apache#full-configuration"
warn "Restoring configuration at '/bitnami/apache/conf' to '${APACHE_CONF_DIR}'"
rm -rf "$APACHE_CONF_DIR"
ln -sf "/bitnami/apache/conf" "$APACHE_CONF_DIR"
fi
# Update ports in configuration
[[ -n "$APACHE_HTTP_PORT_NUMBER" ]] && info "Configuring the HTTP port" && apache_configure_http_port "$APACHE_HTTP_PORT_NUMBER"
[[ -n "$APACHE_HTTPS_PORT_NUMBER" ]] && info "Configuring the HTTPS port" && apache_configure_https_port "$APACHE_HTTPS_PORT_NUMBER"
# Fix logging issue when running as root
! am_i_root || chmod o+w "$(readlink /dev/stdout)" "$(readlink /dev/stderr)"

View File

@ -112,54 +112,6 @@ apache_configure_https_port() {
fi
}
########################
# Ensure Apache is initialized
# Globals:
# APACHE_*
# Arguments:
# None
# Returns:
# None
#########################
apache_initialize() {
# Copy vhosts files
if ! is_dir_empty "/vhosts"; then
info "Found mounted virtual hosts in '/vhosts'. Copying them to '${APACHE_BASE_DIR}/conf/vhosts'"
cp -Lr "/vhosts/." "${APACHE_VHOSTS_DIR}"
fi
# Mount certificate files
if ! is_dir_empty "${APACHE_BASE_DIR}/certs"; then
warn "The directory '${APACHE_BASE_DIR}/certs' was externally mounted. This is a legacy configuration and will be deprecated soon. Please mount certificate files at '/certs' instead. Find an example at: https://github.com/bitnami/bitnami-docker-apache#using-custom-ssl-certificates"
warn "Restoring certificates at '${APACHE_BASE_DIR}/certs' to '${APACHE_CONF_DIR}/bitnami/certs'"
rm -rf "${APACHE_CONF_DIR}/bitnami/certs"
ln -sf "${APACHE_BASE_DIR}/certs" "${APACHE_CONF_DIR}/bitnami/certs"
elif ! is_dir_empty "/certs"; then
info "Mounting certificates files from '/certs'"
rm -rf "${APACHE_CONF_DIR}/bitnami/certs"
ln -sf "/certs" "${APACHE_CONF_DIR}/bitnami/certs"
fi
# Mount application files
if ! is_dir_empty "/app"; then
info "Mounting application files from '/app'"
rm -rf "$APACHE_HTDOCS_DIR"
ln -sf "/app" "$APACHE_HTDOCS_DIR"
fi
# Port configuration
[[ -n "$APACHE_HTTP_PORT_NUMBER" ]] && info "Configuring the HTTP port" && apache_configure_http_port "$APACHE_HTTP_PORT_NUMBER"
[[ -n "$APACHE_HTTPS_PORT_NUMBER" ]] && info "Configuring the HTTPS port" && apache_configure_https_port "$APACHE_HTTPS_PORT_NUMBER"
# Restore persisted configuration files (deprecated)
if ! is_dir_empty "/bitnami/apache/conf"; then
warn "The directory '/bitnami/apache/conf' was externally mounted. This is a legacy configuration and will be deprecated soon. Please mount certificate files at '${APACHE_CONF_DIR}' instead. Find an example at: https://github.com/bitnami/bitnami-docker-apache#full-configuration"
warn "Restoring configuration at '/bitnami/apache/conf' to '${APACHE_CONF_DIR}'"
rm -rf "$APACHE_CONF_DIR"
ln -sf "/bitnami/apache/conf" "$APACHE_CONF_DIR"
fi
}
########################
# Enable a module in the Apache configuration file
# Globals:
@ -325,27 +277,37 @@ apache_replace_htaccess_files() {
esac
shift
done
# Locate all .htaccess files inside the document root
read -r -a htaccess_files <<< "$(find "$document_root" -name .htaccess -print0 | xargs -0)"
[[ "${#htaccess_files[@]}" = 0 ]] && return
for htaccess_file in "${htaccess_files[@]}"; do
htaccess_dir="$(dirname "$htaccess_file")"
htaccess_contents="$(indent "$(< "$htaccess_file")" 2)"
# Skip if it was already included to the resulting htaccess file
if grep -q "^<Directory \"$htaccess_dir\">" <<< "$htaccess_contents"; then
continue
fi
# Add to the htaccess file
cat >> "$result_file" <<EOF
if is_file_writable "$result_file"; then
# Locate all .htaccess files inside the document root
read -r -a htaccess_files <<< "$(find "$document_root" -name .htaccess -print0 | xargs -0)"
[[ "${#htaccess_files[@]}" = 0 ]] && return
# Create file with root group write privileges, so it can be modified in non-root containers
[[ ! -f "$result_file" ]] && touch "$result_file" && chmod g+rw "$result_file"
for htaccess_file in "${htaccess_files[@]}"; do
htaccess_dir="$(dirname "$htaccess_file")"
htaccess_contents="$(indent "$(< "$htaccess_file")" 2)"
# Skip if it was already included to the resulting htaccess file
if grep -q "^<Directory \"$htaccess_dir\">" <<< "$htaccess_contents"; then
continue
fi
# Add to the htaccess file
cat >> "$result_file" <<EOF
<Directory "${htaccess_dir}">
${htaccess_contents}
</Directory>
EOF
# Overwrite the original .htaccess with the explanation text
if is_boolean_yes "$overwrite"; then
echo "# This configuration has been moved to the ${result_file} config file for performance and security reasons" > "$htaccess_file"
fi
done
# Overwrite the original .htaccess with the explanation text
if is_boolean_yes "$overwrite"; then
echo "# This configuration has been moved to the ${result_file} config file for performance and security reasons" > "$htaccess_file"
fi
done
elif [[ ! -f "$result_file" ]]; then
error "Could not create htaccess for ${app} at '${result_file}'. Check permissions and ownership for parent directories."
return 1
else
warn "The ${app} htaccess file '${result_file}' is not writable. Configurations based on environment variables will not be applied for this file."
return
fi
}
########################
@ -587,7 +549,7 @@ Require local
ErrorDocument 403 "For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname."
# AuthType Basic
# AuthName ${app}
# AuthUserFile "${APACHE_CONF_DIR}/users"
# AuthUserFile "${APACHE_BASE_DIR}/users"
# Require valid-user
EOF
)"

View File

@ -285,6 +285,8 @@ mysql_remote_execute_print_output() {
local -r hostname="${1:?hostname is required}"
local -r port="${2:?port is required}"
local -a args=("-h" "$hostname" "-P" "$port" "--connect-timeout=5")
# When using "localhost" it would try to connect to the socket, which will not exist for mysql-client
[[ -n "${MYSQL_CLIENT_FLAVOR:-}" && "$hostname" = "localhost" ]] && args+=("--protocol=tcp")
shift 2
"mysql_execute_print_output" "$@" "${args[@]}"
}

View File

@ -35,7 +35,7 @@ Non-root container images add an extra layer of security and are generally recom
Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/).
* [`10`, `10-debian-10`, `10.7.0`, `10.7.0-debian-10-r25`, `latest` (10/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-owncloud/blob/10.7.0-debian-10-r25/10/debian-10/Dockerfile)
* [`10`, `10-debian-10`, `10.7.0`, `10.7.0-debian-10-r26`, `latest` (10/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-owncloud/blob/10.7.0-debian-10-r26/10/debian-10/Dockerfile)
Subscribe to project updates by watching the [bitnami/owncloud GitHub repo](https://github.com/bitnami/bitnami-docker-owncloud).