diff --git a/bitnami/apache/2.4/debian-10/Dockerfile b/bitnami/apache/2.4/debian-10/Dockerfile index 552311bbe0a7..ab6a93757988 100644 --- a/bitnami/apache/2.4/debian-10/Dockerfile +++ b/bitnami/apache/2.4/debian-10/Dockerfile @@ -21,7 +21,7 @@ ENV APACHE_ENABLE_CUSTOM_PORTS="no" \ APACHE_HTTPS_PORT_NUMBER="" \ APACHE_HTTP_PORT_NUMBER="" \ BITNAMI_APP_NAME="apache" \ - BITNAMI_IMAGE_VERSION="2.4.43-debian-10-r85" \ + BITNAMI_IMAGE_VERSION="2.4.43-debian-10-r86" \ PATH="/opt/bitnami/common/bin:/opt/bitnami/apache/bin:$PATH" EXPOSE 8080 8443 diff --git a/bitnami/apache/2.4/debian-10/prebuildfs/opt/bitnami/scripts/libos.sh b/bitnami/apache/2.4/debian-10/prebuildfs/opt/bitnami/scripts/libos.sh index fab3aed61bd5..17309d011b4f 100644 --- a/bitnami/apache/2.4/debian-10/prebuildfs/opt/bitnami/scripts/libos.sh +++ b/bitnami/apache/2.4/debian-10/prebuildfs/opt/bitnami/scripts/libos.sh @@ -102,12 +102,28 @@ get_total_memory() { # Globals: # None # Arguments: -# $1 - memory size (optional) +# None +# Flags: +# --memory - memory size (optional) # Returns: # Detected instance size ######################### get_machine_size() { - local memory="${1:-}" + local memory="" + # Validate arguments + while [[ "$#" -gt 0 ]]; do + case "$1" in + --memory) + shift + memory="${1:?missing memory}" + ;; + *) + echo "Invalid command line flag $1" >&2 + return 1 + ;; + esac + shift + done if [[ -z "$memory" ]]; then debug "Memory was not specified, detecting available memory automatically" memory="$(get_total_memory)" @@ -152,10 +168,10 @@ get_supported_machine_sizes() { ######################### convert_to_mb() { local amount="${1:-}" - if [[ $amount =~ ^([0-9]+)(M|G) ]]; then + if [[ $amount =~ ^([0-9]+)(m|M|g|G) ]]; then size="${BASH_REMATCH[1]}" unit="${BASH_REMATCH[2]}" - if [[ "$unit" = "G" ]]; then + if [[ "$unit" = "g" || "$unit" = "G" ]]; then amount="$((size * 1024))" else amount="$size" diff --git a/bitnami/apache/README.md b/bitnami/apache/README.md index 8e7062987550..21185e246710 100644 --- a/bitnami/apache/README.md +++ b/bitnami/apache/README.md @@ -43,7 +43,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/). -* [`2.4-debian-10`, `2.4.43-debian-10-r85`, `2.4`, `2.4.43`, `latest` (2.4/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-apache/blob/2.4.43-debian-10-r85/2.4/debian-10/Dockerfile) +* [`2.4-debian-10`, `2.4.43-debian-10-r86`, `2.4`, `2.4.43`, `latest` (2.4/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-apache/blob/2.4.43-debian-10-r86/2.4/debian-10/Dockerfile) Subscribe to project updates by watching the [bitnami/apache GitHub repo](https://github.com/bitnami/bitnami-docker-apache).