20180422.4.0-debian-10-r1 release

This commit is contained in:
Bitnami Bot 2020-07-15 21:30:21 +00:00
parent 398bbdf9e5
commit 11d0d2acad
7 changed files with 161 additions and 133 deletions

View File

@ -20,15 +20,15 @@ RUN apt-get update && apt-get upgrade -y && \
RUN chmod g+rwX /opt/bitnami
COPY rootfs /
RUN /opt/bitnami/scripts/php/postunpack.sh
RUN /opt/bitnami/scripts/apache/postunpack.sh
RUN /opt/bitnami/scripts/php/postunpack.sh
RUN /opt/bitnami/scripts/apache-modphp/postunpack.sh
RUN /opt/bitnami/scripts/dokuwiki/postunpack.sh
ENV APACHE_ENABLE_CUSTOM_PORTS="no" \
APACHE_HTTPS_PORT_NUMBER="" \
APACHE_HTTP_PORT_NUMBER="" \
BITNAMI_APP_NAME="dokuwiki" \
BITNAMI_IMAGE_VERSION="20180422.4.0-debian-10-r0" \
BITNAMI_IMAGE_VERSION="20180422.4.0-debian-10-r1" \
DOKUWIKI_EMAIL="user@example.com" \
DOKUWIKI_FULL_NAME="Full Name" \
DOKUWIKI_PASSWORD="bitnami1" \

View File

@ -11,12 +11,26 @@
[[ -f "/opt/bitnami/scripts/libapache.sh" ]] && . /opt/bitnami/scripts/libapache.sh
[[ -f "/opt/bitnami/scripts/libnginx.sh" ]] && . /opt/bitnami/scripts/libnginx.sh
# Load environment for all configured web servers
[[ -f "/opt/bitnami/scripts/apache-env.sh" ]] && . /opt/bitnami/scripts/apache-env.sh
[[ -f "/opt/bitnami/scripts/nginx-env.sh" ]] && . /opt/bitnami/scripts/nginx-env.sh
########################
# Prints the list of enabled web servers
# Globals:
# WEB_SERVER_TYPE
# Arguments:
# None
# Returns:
# None
#########################
web_server_list() {
local -r -a supported_web_servers=(apache nginx)
local -a existing_web_servers=()
for web_server in "${supported_web_servers[@]}"; do
[[ -f "/opt/bitnami/scripts/${web_server}-env.sh" ]] && existing_web_servers+=("$web_server")
done
echo "${existing_web_servers[@]:-}"
}
########################
# Prints the currently-enabled web server type
# Prints the currently-enabled web server type (only one, in order of preference)
# Globals:
# WEB_SERVER_TYPE
# Arguments:
@ -25,7 +39,9 @@
# None
#########################
web_server_type() {
echo "$WEB_SERVER_TYPE"
local -a web_servers
read -r -a web_servers <<< "$(web_server_list)"
echo "${web_servers[0]:-}"
}
########################
@ -79,6 +95,7 @@ is_web_server_running() {
# None
#########################
web_server_start() {
info "Starting $(web_server_type) in background"
"${BITNAMI_ROOT_DIR}/scripts/$(web_server_type)/start.sh"
}
@ -92,6 +109,7 @@ web_server_start() {
# None
#########################
web_server_stop() {
info "Stopping $(web_server_type)"
"${BITNAMI_ROOT_DIR}/scripts/$(web_server_type)/stop.sh"
}
@ -105,6 +123,7 @@ web_server_stop() {
# None
#########################
web_server_restart() {
info "Restarting $(web_server_type)"
"${BITNAMI_ROOT_DIR}/scripts/$(web_server_type)/restart.sh"
}
@ -118,6 +137,7 @@ web_server_restart() {
# None
#########################
web_server_reload() {
info "Reloading $(web_server_type) configuration"
"${BITNAMI_ROOT_DIR}/scripts/$(web_server_type)/reload.sh"
}
@ -150,50 +170,54 @@ web_server_reload() {
########################
ensure_web_server_app_configuration_exists() {
local app="${1:?missing app}"
local -a args=("$app")
# Validate arguments
shift
while [[ "$#" -gt 0 ]]; do
case "$1" in
# Common flags
--hosts \
| --type \
| --allow-remote-connections \
| --disabled \
| --enable-https \
| --http-port \
| --https-port \
| --document-root \
)
args+=("$1" "${2:?missing value}")
shift
;;
# Specific Apache flags
--apache-additional-configuration \
| --apache-before-vhost-configuration \
| --apache-allow-override \
| --apache-extra-directory-configuration \
| --apache-move-htaccess \
)
[[ "$(web_server_type)" == "apache" ]] && args+=("${1//apache-/}" "${2:?missing value}")
shift
;;
# Specific NGINX flags
--nginx-additional-configuration)
[[ "$(web_server_type)" == "nginx" ]] && args+=("${1//nginx-/}" "${2:?missing value}")
shift
;;
*)
echo "Invalid command line flag $1" >&2
return 1
;;
esac
local -a web_servers args
read -r -a web_servers <<< "$(web_server_list)"
for web_server in "${web_servers[@]}"; do
args=("$app")
# Validate arguments
shift
while [[ "$#" -gt 0 ]]; do
case "$1" in
# Common flags
--hosts \
| --type \
| --allow-remote-connections \
| --disabled \
| --enable-https \
| --http-port \
| --https-port \
| --document-root \
)
args+=("$1" "${2:?missing value}")
shift
;;
# Specific Apache flags
--apache-additional-configuration \
| --apache-before-vhost-configuration \
| --apache-allow-override \
| --apache-extra-directory-configuration \
| --apache-move-htaccess \
)
[[ "$web_server" == "apache" ]] && args+=("${1//apache-/}" "${2:?missing value}")
shift
;;
# Specific NGINX flags
--nginx-additional-configuration)
[[ "$web_server" == "nginx" ]] && args+=("${1//nginx-/}" "${2:?missing value}")
shift
;;
*)
echo "Invalid command line flag $1" >&2
return 1
;;
esac
shift
done
"ensure_${web_server}_app_configuration_exists" "${args[@]}"
done
"ensure_$(web_server_type)_app_configuration_exists" "${args[@]}"
}
########################
@ -208,7 +232,11 @@ ensure_web_server_app_configuration_exists() {
########################
ensure_web_server_app_configuration_not_exists() {
local app="${1:?missing app}"
"ensure_$(web_server_type)_app_configuration_not_exists" "$app"
local -a web_servers
read -r -a web_servers <<< "$(web_server_list)"
for web_server in "${web_servers[@]}"; do
"ensure_${web_server}_app_configuration_not_exists" "$app"
done
}
########################
@ -235,45 +263,49 @@ ensure_web_server_app_configuration_not_exists() {
########################
ensure_web_server_prefix_configuration_exists() {
local app="${1:?missing app}"
local -a args=("$app")
# Validate arguments
shift
while [[ "$#" -gt 0 ]]; do
case "$1" in
# Common flags
--allow-remote-connections \
| --document-root \
| --prefix \
| --type \
)
args+=("$1" "${2:?missing value}")
shift
;;
# Specific Apache flags
--apache-additional-configuration \
| --apache-allow-override \
| --apache-extra-directory-configuration \
| --apache-move-htaccess \
)
[[ "$(web_server_type)" == "apache" ]] && args+=("${1//apache-/}" "$2")
shift
;;
# Specific NGINX flags
--nginx-additional-configuration)
[[ "$(web_server_type)" == "nginx" ]] && args+=("${1//nginx-/}" "$2")
shift
;;
*)
echo "Invalid command line flag $1" >&2
return 1
;;
esac
local -a web_servers args
read -r -a web_servers <<< "$(web_server_list)"
for web_server in "${web_servers[@]}"; do
args=("$app")
# Validate arguments
shift
while [[ "$#" -gt 0 ]]; do
case "$1" in
# Common flags
--allow-remote-connections \
| --document-root \
| --prefix \
| --type \
)
args+=("$1" "${2:?missing value}")
shift
;;
# Specific Apache flags
--apache-additional-configuration \
| --apache-allow-override \
| --apache-extra-directory-configuration \
| --apache-move-htaccess \
)
[[ "$web_server" == "apache" ]] && args+=("${1//apache-/}" "$2")
shift
;;
# Specific NGINX flags
--nginx-additional-configuration)
[[ "$web_server" == "nginx" ]] && args+=("${1//nginx-/}" "$2")
shift
;;
*)
echo "Invalid command line flag $1" >&2
return 1
;;
esac
shift
done
"ensure_${web_server}_prefix_configuration_exists" "${args[@]}"
done
"ensure_$(web_server_type)_prefix_configuration_exists" "${args[@]}"
}
########################
@ -293,29 +325,33 @@ ensure_web_server_prefix_configuration_exists() {
########################
web_server_update_app_configuration() {
local app="${1:?missing app}"
local -a args=("$app")
# Validate arguments
shift
while [[ "$#" -gt 0 ]]; do
case "$1" in
# Common flags
--hosts \
| --enable-https \
| --http-port \
| --https-port \
)
args+=("$1" "${2:?missing value}")
shift
;;
*)
echo "Invalid command line flag $1" >&2
return 1
;;
esac
local -a web_servers args
read -r -a web_servers <<< "$(web_server_list)"
for web_server in "${web_servers[@]}"; do
args=("$app")
# Validate arguments
shift
while [[ "$#" -gt 0 ]]; do
case "$1" in
# Common flags
--hosts \
| --enable-https \
| --http-port \
| --https-port \
)
args+=("$1" "${2:?missing value}")
shift
;;
*)
echo "Invalid command line flag $1" >&2
return 1
;;
esac
shift
done
"${web_server}_update_app_configuration" "${args[@]}"
done
"$(web_server_type)_update_app_configuration" "${args[@]}"
}
########################

View File

@ -10,12 +10,10 @@ set -o pipefail
# Load DokuWiki environment
. /opt/bitnami/scripts/dokuwiki-env.sh
# Load web server environment and functions (after DokuWiki environment file so MODULE is not set to a wrong value)
. /opt/bitnami/scripts/libwebserver.sh
# Load libraries
. /opt/bitnami/scripts/libbitnami.sh
. /opt/bitnami/scripts/liblog.sh
. /opt/bitnami/scripts/libwebserver.sh
print_welcome_page

View File

@ -1,6 +1,6 @@
#!/bin/bash
# shellcheck disable=SC1091
# shellcheck disable=SC1090,SC1091
set -o errexit
set -o nounset
@ -13,15 +13,16 @@ set -o pipefail
# Load PHP environment for 'php_conf_set' (after 'dokuwiki-env.sh' so that MODULE is not set to a wrong value)
. /opt/bitnami/scripts/php-env.sh
# Load web server environment and functions (after DokuWiki environment file so MODULE is not set to a wrong value)
. /opt/bitnami/scripts/libwebserver.sh
# Load libraries
. /opt/bitnami/scripts/libdokuwiki.sh
. /opt/bitnami/scripts/libfile.sh
. /opt/bitnami/scripts/libfs.sh
. /opt/bitnami/scripts/liblog.sh
. /opt/bitnami/scripts/libphp.sh
. /opt/bitnami/scripts/libwebserver.sh
# Load web server environment and functions (after DokuWiki environment file so MODULE is not set to a wrong value)
. "/opt/bitnami/scripts/$(web_server_type)-env.sh"
# Ensure the DokuWiki base directory exists and has proper permissions
info "Configuring file permissions for DokuWiki"

View File

@ -1,6 +1,6 @@
#!/bin/bash
# shellcheck disable=SC1091
# shellcheck disable=SC1090,SC1091
set -o errexit
set -o nounset
@ -10,11 +10,12 @@ set -o pipefail
# Load DokuWiki environment
. /opt/bitnami/scripts/dokuwiki-env.sh
# Load environment for web server configuration (after DokuWiki environment file so MODULE is not set to a wrong value)
. /opt/bitnami/scripts/libwebserver.sh
# Load libraries
. /opt/bitnami/scripts/libdokuwiki.sh
. /opt/bitnami/scripts/libwebserver.sh
# Load web server environment and functions (after DokuWiki environment file so MODULE is not set to a wrong value)
. "/opt/bitnami/scripts/$(web_server_type)-env.sh"
# Ensure DokuWiki environment variables are valid
dokuwiki_validate

View File

@ -4,18 +4,12 @@
# shellcheck disable=SC1091
# Load DokuWiki environment
. /opt/bitnami/scripts/dokuwiki-env.sh
# Load web server environment and functions
. /opt/bitnami/scripts/libwebserver.sh
# Load generic libraries
. /opt/bitnami/scripts/libphp.sh
. /opt/bitnami/scripts/libfs.sh
. /opt/bitnami/scripts/libos.sh
. /opt/bitnami/scripts/libvalidations.sh
. /opt/bitnami/scripts/libpersistence.sh
. /opt/bitnami/scripts/libwebserver.sh
########################
# Validate settings in DOKUWIKI_* env vars
@ -108,10 +102,8 @@ dokuwiki_pass_wizard() {
"--data-urlencode" "d[password]=${DOKUWIKI_PASSWORD}"
"--data-urlencode" "d[confirm]=${DOKUWIKI_PASSWORD}"
)
curl "${curl_opts[@]}" "${curl_data_opts[@]}" "${wizard_url}"
# Check it has been configured
curl_output=$(curl "${wizard_url}")
if [[ "$curl_output" != *"already exists"* ]]; then
curl_output="$(curl "${curl_opts[@]}" "${curl_data_opts[@]}" "${wizard_url}" 2>&1)"
if [[ "$curl_output" != *"The configuration was finished successfully."* ]]; then
error "An error occurred while installing DokuWiki"
return 1
fi

View File

@ -33,7 +33,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/).
* [`20180422-debian-10`, `20180422.4.0-debian-10-r0`, `20180422`, `20180422.4.0`, `latest` (20180422/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-dokuwiki/blob/20180422.4.0-debian-10-r0/20180422/debian-10/Dockerfile)
* [`20180422-debian-10`, `20180422.4.0-debian-10-r1`, `20180422`, `20180422.4.0`, `latest` (20180422/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-dokuwiki/blob/20180422.4.0-debian-10-r1/20180422/debian-10/Dockerfile)
Subscribe to project updates by watching the [bitnami/dokuwiki GitHub repo](https://github.com/bitnami/bitnami-docker-dokuwiki).
@ -320,8 +320,8 @@ Based on the extended image, you can update the [`docker-compose.yml`](https://g
- This image has been adapted so it's easier to customize. See the [Customize this image](#customize-this-image) section for more information.
- The Apache configuration volume (`/bitnami/apache`) has been deprecated, and support for this feature will be dropped in the near future. Until then, the container will enable the Apache configuration from that volume if it exists. By default, and if the configuration volume does not exist, the configuration files will be regenerated each time the container is created. Users wanting to apply custom Apache configuration files are advised to mount a volume for the configuration at `/opt/bitnami/apache/conf`, or mount specific configuration files individually.
- The PHP configuration volume (`/bitnami/php`) has been deprecated, and support for this feature will be dropped in the near future. Until then, the container will enable the PHP configuration from that volume if it exists. By default, and if the configuration volume does not exist, the configuration files will be regenerated each time the container is created. Users wanting to apply custom PHP configuration files are advised to mount a volume for the configuration at `/opt/bitnami/php/conf`, or mount specific configuration files individually.
- Enabling custom Apache certificates by placing them at `/opt/bitnami/apache/certs` has been deprecated, and support for this functionality will be dropped in the near future. Users wanting to enable custom certificates are advised to mount their certificate files on top of the preconfigured ones at `/certs`.
- The PHP configuration volume (`/bitnami/php`) has been deprecated, and support for this feature will be dropped in the near future. Until then, the container will enable the PHP configuration from that volume if it exists. By default, and if the configuration volume does not exist, the configuration files will be regenerated each time the container is created. Users wanting to apply custom PHP configuration files are advised to mount a volume for the configuration at `/opt/bitnami/php/conf`, or mount specific configuration files individually.
- Enabling custom Apache certificates by placing them at `/opt/bitnami/apache/certs` has been deprecated, and support for this functionality will be dropped in the near future. Users wanting to enable custom certificates are advised to mount their certificate files on top of the preconfigured ones at `/certs`.
### 0.20170219.201708232029-r3