1.6.6-debian-10-r71 release

This commit is contained in:
Bitnami Bot 2020-07-29 21:06:52 +00:00
parent e7658122a3
commit fb85fe469f
9 changed files with 164 additions and 162 deletions

View File

@ -20,7 +20,7 @@ RUN ln -s /opt/bitnami/scripts/memcached/run.sh /run.sh
COPY rootfs /
RUN /opt/bitnami/scripts/memcached/postunpack.sh
ENV BITNAMI_APP_NAME="memcached" \
BITNAMI_IMAGE_VERSION="1.6.6-debian-10-r70" \
BITNAMI_IMAGE_VERSION="1.6.6-debian-10-r71" \
PATH="/opt/bitnami/memcached/bin:/opt/bitnami/common/bin:$PATH"
EXPOSE 11211

View File

@ -0,0 +1 @@
{"gosu": {"arch": "amd64", "digest": "51cfb1b7fd7b05b8abd1df0278c698103a9b1a4964bdacd87ca1d5c01631d59c", "distro": "debian-10", "type": "NAMI", "version": "1.12.0-1"}, "memcached": {"arch": "amd64", "digest": "15b1c136500b48450c07053972745188e9bfda7c8177d51e905d2a17a107e624", "distro": "debian-10", "type": "NAMI", "version": "1.6.6-0"}}

View File

@ -62,8 +62,4 @@ component_unpack() {
fi
tar --directory "${directory}" --extract --gunzip --file "${base_name}.tar.gz" --no-same-owner --strip-components=2 "${base_name}/files/"
rm "${base_name}.tar.gz"
# Include metadata about the package
touch "${directory}/.bitnami_packages"
echo "$base_name" >> "${directory}/.bitnami_packages"
}

View File

@ -2,19 +2,35 @@
#
# Bitnami web server handler library
# shellcheck disable=SC1091
# shellcheck disable=SC1090,SC1091
# Load generic libraries
. /opt/bitnami/scripts/liblog.sh
# Load web server libraries
[[ -f "/opt/bitnami/scripts/libapache.sh" ]] && . /opt/bitnami/scripts/libapache.sh
[[ -f "/opt/bitnami/scripts/libnginx.sh" ]] && . /opt/bitnami/scripts/libnginx.sh
########################
# Execute a command (or list of commands) with the web server environment and library loaded
# Globals:
# *
# Arguments:
# None
# Returns:
# None
#########################
web_server_execute() {
local -r web_server="${1:?missing web server}"
shift
# Run program in sub-shell to avoid web server environment getting loaded when not necessary
(
. "/opt/bitnami/scripts/lib${web_server}.sh"
. "/opt/bitnami/scripts/${web_server}-env.sh"
"$@"
)
}
########################
# Prints the list of enabled web servers
# Globals:
# WEB_SERVER_TYPE
# None
# Arguments:
# None
# Returns:
@ -32,7 +48,7 @@ web_server_list() {
########################
# Prints the currently-enabled web server type (only one, in order of preference)
# Globals:
# WEB_SERVER_TYPE
# None
# Arguments:
# None
# Returns:
@ -47,7 +63,7 @@ web_server_type() {
########################
# Validate that a supported web server is configured
# Globals:
# WEB_SERVER_*
# None
# Arguments:
# None
# Returns:
@ -65,7 +81,7 @@ web_server_validate() {
if [[ -z "$(web_server_type)" || ! " ${supported_web_servers[*]} " == *" $(web_server_type) "* ]]; then
print_validation_error "Could not detect any supported web servers. It must be one of: ${supported_web_servers[*]}"
elif ! type -t "is_$(web_server_type)_running" >/dev/null; then
elif ! web_server_execute "$(web_server_type)" type -t "is_$(web_server_type)_running" >/dev/null; then
print_validation_error "Could not load the $(web_server_type) web server library from /opt/bitnami/scripts. Check that it exists and is readable."
fi
@ -170,53 +186,56 @@ web_server_reload() {
########################
ensure_web_server_app_configuration_exists() {
local app="${1:?missing app}"
local -a web_servers args
shift
local -a apache_args nginx_args web_servers args_var
apache_args=("$app")
nginx_args=("$app")
# Validate arguments
while [[ "$#" -gt 0 ]]; do
case "$1" in
# Common flags
--hosts \
| --type \
| --allow-remote-connections \
| --disabled \
| --enable-https \
| --http-port \
| --https-port \
| --document-root \
)
apache_args+=("$1" "${2:?missing value}")
nginx_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 \
)
apache_args+=("${1//apache-/}" "${2:?missing value}")
shift
;;
# Specific NGINX flags
--nginx-additional-configuration)
nginx_args+=("${1//nginx-/}" "${2:?missing value}")
shift
;;
*)
echo "Invalid command line flag $1" >&2
return 1
;;
esac
shift
done
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[@]}"
args_var="${web_server}_args[@]"
web_server_execute "$web_server" "ensure_${web_server}_app_configuration_exists" "${!args_var}"
done
}
@ -235,7 +254,7 @@ ensure_web_server_app_configuration_not_exists() {
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"
web_server_execute "$web_server" "ensure_${web_server}_app_configuration_not_exists" "$app"
done
}
@ -263,48 +282,51 @@ ensure_web_server_app_configuration_not_exists() {
########################
ensure_web_server_prefix_configuration_exists() {
local app="${1:?missing app}"
local -a web_servers args
shift
local -a apache_args nginx_args web_servers args_var
apache_args=("$app")
nginx_args=("$app")
# Validate arguments
while [[ "$#" -gt 0 ]]; do
case "$1" in
# Common flags
--allow-remote-connections \
| --document-root \
| --prefix \
| --type \
)
apache_args+=("$1" "${2:?missing value}")
nginx_args+=("$1" "${2:?missing value}")
shift
;;
# Specific Apache flags
--apache-additional-configuration \
| --apache-allow-override \
| --apache-extra-directory-configuration \
| --apache-move-htaccess \
)
apache_args+=("${1//apache-/}" "$2")
shift
;;
# Specific NGINX flags
--nginx-additional-configuration)
nginx_args+=("${1//nginx-/}" "$2")
shift
;;
*)
echo "Invalid command line flag $1" >&2
return 1
;;
esac
shift
done
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[@]}"
args_var="${web_server}_args[@]"
web_server_execute "$web_server" "ensure_${web_server}_prefix_configuration_exists" "${!args_var}"
done
}
@ -325,32 +347,32 @@ ensure_web_server_prefix_configuration_exists() {
########################
web_server_update_app_configuration() {
local app="${1:?missing app}"
local -a web_servers args
shift
local -a args web_servers
args=("$app")
# Validate arguments
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
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[@]}"
web_server_execute "$web_server" "${web_server}_update_app_configuration" "${args[@]}"
done
}

View File

@ -76,25 +76,6 @@ memcached_initialize() {
fi
}
########################
# Configure memcached debug flags
# Globals:
# BITNAMI_DEBUG
# Arguments:
# None
# Returns:
# Array with verbosity flags to use
#########################
memcached_debug_flags() {
local debugFlags
if is_boolean_yes "${BITNAMI_DEBUG}"; then
debugFlags=("-vv")
else
debugFlags=("-v")
fi
echo "${debugFlags[@]}"
}
########################
# Create SASL user
# Globals:

View File

@ -18,9 +18,11 @@ export BITNAMI_DEBUG="${BITNAMI_DEBUG:-false}"
# By setting an environment variable matching *_FILE to a file path, the prefixed environment
# variable will be overridden with the value specified in that file
memcached_env_vars=(
MEMCACHED_LISTEN_ADDRESS
MEMCACHED_PORT_NUMBER
MEMCACHED_USERNAME
MEMCACHED_PASSWORD
MEMCACHED_EXTRA_FLAGS
MEMCACHED_MAX_TIMEOUT
MEMCACHED_CACHE_SIZE
MEMCACHED_MAX_CONNECTIONS
@ -40,6 +42,7 @@ unset memcached_env_vars
export MEMCACHED_BASE_DIR="${BITNAMI_ROOT_DIR}/memcached"
export MEMCACHED_CONF_DIR="${MEMCACHED_BASE_DIR}/conf"
export MEMCACHED_BIN_DIR="${MEMCACHED_BASE_DIR}/bin"
export PATH="${MEMCACHED_BIN_DIR}:${PATH}"
# SASL
export SASL_CONF_PATH="${MEMCACHED_CONF_DIR}/sasl2"
@ -51,9 +54,11 @@ export MEMCACHED_DAEMON_USER="memcached"
export MEMCACHED_DAEMON_GROUP="memcached"
# Memcached configuration
export MEMCACHED_LISTEN_ADDRESS="${MEMCACHED_LISTEN_ADDRESS:-}"
export MEMCACHED_PORT_NUMBER="${MEMCACHED_PORT_NUMBER:-11211}"
export MEMCACHED_USERNAME="${MEMCACHED_USERNAME:-root}"
export MEMCACHED_PASSWORD="${MEMCACHED_PASSWORD:-}"
export MEMCACHED_EXTRA_FLAGS="${MEMCACHED_EXTRA_FLAGS:-}"
# Memcached optimizations
export MEMCACHED_MAX_TIMEOUT="${MEMCACHED_MAX_TIMEOUT:-5}"

View File

@ -2,10 +2,14 @@
# shellcheck disable=SC1091
set -o errexit
set -o nounset
set -o pipefail
# set -o xtrace # Uncomment this line for debugging purposes
# Load libraries
. /opt/bitnami/scripts/libmemcached.sh
. /opt/bitnami/scripts/libfs.sh
. /opt/bitnami/scripts/libos.sh # used for resize
# Load Memcached environment variables
. /opt/bitnami/scripts/memcached-env.sh

View File

@ -15,30 +15,23 @@ set -o pipefail
# Load Memcached environment variables
. /opt/bitnami/scripts/memcached-env.sh
# Constants
EXEC=$(command -v memcached)
# Configure arguments with extra flags
args=("-u" "${MEMCACHED_DAEMON_USER}" "-p" "${MEMCACHED_PORT_NUMBER}" "$(memcached_debug_flags)")
args=("-u" "$MEMCACHED_DAEMON_USER" "-p" "$MEMCACHED_PORT_NUMBER" "-v")
[[ -n "$MEMCACHED_LISTEN_ADDRESS" ]] && args+=("-l" "$MEMCACHED_LISTEN_ADDRESS")
# SASL
if [[ -f "${SASL_DB_FILE}" ]]; then
args+=("-S")
fi
[[ -f "$SASL_DB_FILE" ]] && args+=("-S")
# Memory configuration
if [[ -n "${MEMCACHED_CACHE_SIZE}" ]]; then
args+=("-m" "${MEMCACHED_CACHE_SIZE}")
fi
if [[ -n "$MEMCACHED_MAX_CONNECTIONS" ]]; then
args+=("-c" "${MEMCACHED_MAX_CONNECTIONS}")
fi
if [[ -n "${MEMCACHED_THREADS}" ]]; then
args+=("-t" "${MEMCACHED_THREADS}")
fi
[[ -n "$MEMCACHED_CACHE_SIZE" ]] && args+=("-m" "$MEMCACHED_CACHE_SIZE")
[[ -n "$MEMCACHED_MAX_CONNECTIONS" ]] && args+=("-c" "$MEMCACHED_MAX_CONNECTIONS")
[[ -n "$MEMCACHED_THREADS" ]] && args+=("-t" "$MEMCACHED_THREADS")
# Extra flags
read -r -a extra_flags <<< "$MEMCACHED_EXTRA_FLAGS"
[[ "${#extra_flags[@]}" -gt 0 ]] && args+=("${extra_flags[@]}")
args+=("$@")
info "** Starting Memcached **"
if am_i_root; then
exec gosu "${MEMCACHED_DAEMON_USER}" "${EXEC}" "${args[@]}"
exec gosu "$MEMCACHED_DAEMON_USER" memcached "${args[@]}"
else
exec "${EXEC}" "${args[@]}"
exec memcached "${args[@]}"
fi

View File

@ -44,7 +44,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/).
* [`1-debian-10`, `1.6.6-debian-10-r70`, `1`, `1.6.6`, `latest` (1/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-memcached/blob/1.6.6-debian-10-r70/1/debian-10/Dockerfile)
* [`1-debian-10`, `1.6.6-debian-10-r71`, `1`, `1.6.6`, `latest` (1/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-memcached/blob/1.6.6-debian-10-r71/1/debian-10/Dockerfile)
Subscribe to project updates by watching the [bitnami/memcached GitHub repo](https://github.com/bitnami/bitnami-docker-memcached).