From d2a3a14c32fa9e81d97c61ec8215483a2611af87 Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Thu, 25 Jun 2020 00:14:09 +0000 Subject: [PATCH] 6.0.3-2-debian-10-r7 release --- bitnami/rails/6/debian-10/Dockerfile | 2 +- .../prebuildfs/opt/bitnami/scripts/libos.sh | 24 +++++++++++++++---- bitnami/rails/README.md | 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/bitnami/rails/6/debian-10/Dockerfile b/bitnami/rails/6/debian-10/Dockerfile index c4ecf885ec72..85ceaf00af30 100644 --- a/bitnami/rails/6/debian-10/Dockerfile +++ b/bitnami/rails/6/debian-10/Dockerfile @@ -22,7 +22,7 @@ COPY rootfs / RUN /opt/bitnami/scripts/rails/postunpack.sh ENV ALLOW_EMPTY_PASSWORD="no" \ BITNAMI_APP_NAME="rails" \ - BITNAMI_IMAGE_VERSION="6.0.3-2-debian-10-r6" \ + BITNAMI_IMAGE_VERSION="6.0.3-2-debian-10-r7" \ MARIADB_HOST="mariadb" \ MARIADB_PORT_NUMBER="3306" \ MARIADB_ROOT_PASSWORD="" \ diff --git a/bitnami/rails/6/debian-10/prebuildfs/opt/bitnami/scripts/libos.sh b/bitnami/rails/6/debian-10/prebuildfs/opt/bitnami/scripts/libos.sh index fab3aed61bd5..17309d011b4f 100644 --- a/bitnami/rails/6/debian-10/prebuildfs/opt/bitnami/scripts/libos.sh +++ b/bitnami/rails/6/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/rails/README.md b/bitnami/rails/README.md index 0a71ea8b216d..06ca180f1018 100644 --- a/bitnami/rails/README.md +++ b/bitnami/rails/README.md @@ -28,7 +28,7 @@ $ docker-compose up 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/). -* [`6-debian-10`, `6.0.3-2-debian-10-r6`, `6`, `6.0.3-2`, `latest` (6/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-rails/blob/6.0.3-2-debian-10-r6/6/debian-10/Dockerfile) +* [`6-debian-10`, `6.0.3-2-debian-10-r7`, `6`, `6.0.3-2`, `latest` (6/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-rails/blob/6.0.3-2-debian-10-r7/6/debian-10/Dockerfile) Subscribe to project updates by watching the [bitnami/rails GitHub repo](https://github.com/bitnami/bitnami-docker-rails).