1.19.0-debian-10-r2 release
This commit is contained in:
parent
7c7de96f3e
commit
cae818e519
|
|
@ -20,7 +20,7 @@ RUN ln -sf /dev/stderr /opt/bitnami/nginx/logs/error.log
|
|||
COPY rootfs /
|
||||
RUN /opt/bitnami/scripts/nginx/postunpack.sh
|
||||
ENV BITNAMI_APP_NAME="nginx" \
|
||||
BITNAMI_IMAGE_VERSION="1.19.0-debian-10-r1" \
|
||||
BITNAMI_IMAGE_VERSION="1.19.0-debian-10-r2" \
|
||||
NGINX_ENABLE_CUSTOM_PORTS="no" \
|
||||
NGINX_HTTPS_PORT_NUMBER="" \
|
||||
NGINX_HTTP_PORT_NUMBER="" \
|
||||
|
|
|
|||
|
|
@ -59,6 +59,23 @@ is_dir_empty() {
|
|||
fi
|
||||
}
|
||||
|
||||
########################
|
||||
# Checks whether a mounted directory is empty or not
|
||||
# arguments:
|
||||
# $1 - directory
|
||||
# returns:
|
||||
# boolean
|
||||
#########################
|
||||
is_mounted_dir_empty() {
|
||||
local dir="${1:?missing directory}"
|
||||
|
||||
if is_dir_empty "$dir" || find "$dir" -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" -exec false {} +; then
|
||||
true
|
||||
else
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
||||
########################
|
||||
# Checks whether a file can be written to or not
|
||||
# arguments:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,99 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Bitnami persistence library
|
||||
# Used for bringing persistence capabilities to applications that don't have clear separation of data and logic
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
# Load Generic Libraries
|
||||
. /opt/bitnami/scripts/libfs.sh
|
||||
. /opt/bitnami/scripts/liblog.sh
|
||||
. /opt/bitnami/scripts/libversion.sh
|
||||
|
||||
# Functions
|
||||
|
||||
########################
|
||||
# Persist an application directory
|
||||
# Globals:
|
||||
# BITNAMI_ROOT_DIR
|
||||
# BITNAMI_VOLUME_DIR
|
||||
# Arguments:
|
||||
# $1 - App folder name
|
||||
# $2 - List of app files to persist
|
||||
# Returns:
|
||||
# true if all steps succeeded, false otherwise
|
||||
#########################
|
||||
persist_app() {
|
||||
local -r app="${1:?missing app}"
|
||||
local -a files_to_restore
|
||||
read -r -a files_to_persist <<< "$2"
|
||||
local -r install_dir="${BITNAMI_ROOT_DIR}/${app}"
|
||||
local -r persist_dir="${BITNAMI_VOLUME_DIR}/${app}"
|
||||
# Persist the individual files
|
||||
if [[ "${#files_to_persist[@]}" -lt 0 ]]; then
|
||||
warn "No files are configured to be persisted"
|
||||
return
|
||||
fi
|
||||
local file_to_persist_origin file_to_persist_destination file_to_persist_destination_folder
|
||||
for file_to_persist in "${files_to_persist[@]}"; do
|
||||
file_to_persist_origin="${install_dir}/${file_to_persist}"
|
||||
file_to_persist_destination="${persist_dir}/${file_to_persist}"
|
||||
file_to_persist_destination_folder="$(dirname "$file_to_persist_destination")"
|
||||
mkdir -p "$file_to_persist_destination_folder"
|
||||
cp -Lr "$file_to_persist_origin" "$file_to_persist_destination_folder"
|
||||
done
|
||||
# Install the persisted files into the installation directory, via symlinks
|
||||
restore_persisted_app "$@"
|
||||
}
|
||||
|
||||
########################
|
||||
# Restore a persisted application directory
|
||||
# Globals:
|
||||
# BITNAMI_ROOT_DIR
|
||||
# BITNAMI_VOLUME_DIR
|
||||
# FORCE_MAJOR_UPGRADE
|
||||
# Arguments:
|
||||
# $1 - App folder name
|
||||
# $2 - List of app files to restore
|
||||
# Returns:
|
||||
# true if all steps succeeded, false otherwise
|
||||
#########################
|
||||
restore_persisted_app() {
|
||||
local -r app="${1:?missing app}"
|
||||
local -a files_to_restore
|
||||
read -r -a files_to_restore <<< "$2"
|
||||
local -r install_dir="${BITNAMI_ROOT_DIR}/${app}"
|
||||
local -r persist_dir="${BITNAMI_VOLUME_DIR}/${app}"
|
||||
# Restore the individual persisted files
|
||||
if [[ "${#files_to_restore[@]}" -lt 0 ]]; then
|
||||
warn "No persisted files are configured to be restored"
|
||||
return
|
||||
fi
|
||||
local file_to_restore_origin file_to_restore_destination
|
||||
for file_to_restore in "${files_to_restore[@]}"; do
|
||||
# We use realpath to ensure that the case of '.' is covered and the directory is removed
|
||||
file_to_restore_origin="$(realpath "${install_dir}/${file_to_restore}")"
|
||||
file_to_restore_destination="$(realpath "${persist_dir}/${file_to_restore}")"
|
||||
rm -rf "$file_to_restore_origin"
|
||||
ln -sfn "$file_to_restore_destination" "$file_to_restore_origin"
|
||||
done
|
||||
}
|
||||
|
||||
########################
|
||||
# Check if an application directory was already persisted
|
||||
# Globals:
|
||||
# BITNAMI_VOLUME_DIR
|
||||
# Arguments:
|
||||
# $1 - App folder name
|
||||
# Returns:
|
||||
# true if all steps succeeded, false otherwise
|
||||
#########################
|
||||
is_app_initialized() {
|
||||
local -r app="${1:?missing app}"
|
||||
local -r persist_dir="${BITNAMI_VOLUME_DIR}/${app}"
|
||||
if ! is_mounted_dir_empty "$persist_dir"; then
|
||||
true
|
||||
else
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
|
@ -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.19-debian-10`, `1.19.0-debian-10-r1`, `1.19`, `1.19.0`, `latest` (1.19/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-nginx/blob/1.19.0-debian-10-r1/1.19/debian-10/Dockerfile)
|
||||
* [`1.19-debian-10`, `1.19.0-debian-10-r2`, `1.19`, `1.19.0`, `latest` (1.19/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-nginx/blob/1.19.0-debian-10-r2/1.19/debian-10/Dockerfile)
|
||||
* [`1.18-debian-10`, `1.18.0-debian-10-r48`, `1.18`, `1.18.0` (1.18/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-nginx/blob/1.18.0-debian-10-r48/1.18/debian-10/Dockerfile)
|
||||
|
||||
# Get this image
|
||||
|
|
|
|||
Loading…
Reference in New Issue