diff --git a/bitnami/mongodb-sharded/6.0/debian-11/Dockerfile b/bitnami/mongodb-sharded/6.0/debian-11/Dockerfile index e0238ebdffd6..f3c611a5d164 100644 --- a/bitnami/mongodb-sharded/6.0/debian-11/Dockerfile +++ b/bitnami/mongodb-sharded/6.0/debian-11/Dockerfile @@ -4,7 +4,7 @@ ARG TARGETARCH LABEL org.opencontainers.image.authors="https://bitnami.com/contact" \ org.opencontainers.image.description="Application packaged by Bitnami" \ - org.opencontainers.image.ref.name="6.0.1-debian-11-r9" \ + org.opencontainers.image.ref.name="6.0.1-debian-11-r10" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/mongodb-sharded" \ org.opencontainers.image.title="mongodb-sharded" \ org.opencontainers.image.vendor="VMware, Inc." \ @@ -20,13 +20,13 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Install required system packages and dependencies RUN install_packages acl ca-certificates curl gzip libbrotli1 libc6 libcom-err2 libcurl4 libffi7 libgcc-s1 libgcrypt20 libgmp10 libgnutls30 libgpg-error0 libgssapi-krb5-2 libhogweed6 libidn2-0 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblzma5 libnettle8 libnghttp2-14 libp11-kit0 libpsl5 librtmp1 libsasl2-2 libssh2-1 libssl1.1 libtasn1-6 libunistring2 numactl procps tar zlib1g RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \ - if [ ! -f mongodb-shell-1.5.4-2-linux-${OS_ARCH}-debian-11.tar.gz ]; then \ - curl -SsLf https://downloads.bitnami.com/files/stacksmith/mongodb-shell-1.5.4-2-linux-${OS_ARCH}-debian-11.tar.gz -O ; \ - curl -SsLf https://downloads.bitnami.com/files/stacksmith/mongodb-shell-1.5.4-2-linux-${OS_ARCH}-debian-11.tar.gz.sha256 -O ; \ + if [ ! -f mongodb-shell-1.6.0-0-linux-${OS_ARCH}-debian-11.tar.gz ]; then \ + curl -SsLf https://downloads.bitnami.com/files/stacksmith/mongodb-shell-1.6.0-0-linux-${OS_ARCH}-debian-11.tar.gz -O ; \ + curl -SsLf https://downloads.bitnami.com/files/stacksmith/mongodb-shell-1.6.0-0-linux-${OS_ARCH}-debian-11.tar.gz.sha256 -O ; \ fi && \ - sha256sum -c mongodb-shell-1.5.4-2-linux-${OS_ARCH}-debian-11.tar.gz.sha256 && \ - tar -zxf mongodb-shell-1.5.4-2-linux-${OS_ARCH}-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \ - rm -rf mongodb-shell-1.5.4-2-linux-${OS_ARCH}-debian-11.tar.gz mongodb-shell-1.5.4-2-linux-${OS_ARCH}-debian-11.tar.gz.sha256 + sha256sum -c mongodb-shell-1.6.0-0-linux-${OS_ARCH}-debian-11.tar.gz.sha256 && \ + tar -zxf mongodb-shell-1.6.0-0-linux-${OS_ARCH}-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \ + rm -rf mongodb-shell-1.6.0-0-linux-${OS_ARCH}-debian-11.tar.gz mongodb-shell-1.6.0-0-linux-${OS_ARCH}-debian-11.tar.gz.sha256 RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \ if [ ! -f yq-4.27.5-0-linux-${OS_ARCH}-debian-11.tar.gz ]; then \ curl -SsLf https://downloads.bitnami.com/files/stacksmith/yq-4.27.5-0-linux-${OS_ARCH}-debian-11.tar.gz -O ; \ @@ -68,7 +68,7 @@ RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \ tar -zxf gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \ rm -rf gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz.sha256 RUN apt-get update && apt-get upgrade -y && \ - rm -r /var/lib/apt/lists /var/cache/apt/archives + apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives RUN chmod g+rwX /opt/bitnami RUN ln -s /opt/bitnami/scripts/mongodb-sharded/entrypoint.sh /entrypoint.sh RUN ln -s /opt/bitnami/scripts/liblog.sh /liblog.sh diff --git a/bitnami/mongodb-sharded/6.0/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/mongodb-sharded/6.0/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json index fc9e48c0c4e9..8dc3b694490d 100644 --- a/bitnami/mongodb-sharded/6.0/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/mongodb-sharded/6.0/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json @@ -15,10 +15,10 @@ }, "mongodb-shell": { "arch": "amd64", - "digest": "77e3526b982f5fc7160827d41d2fae83a4c3dd3c88dec6fa2b2ce4cbb0078ef8", + "digest": "106b6f4394fe3f4886a09f9d0b3b1dca753e1187068177d3ffde32b2794eb619", "distro": "debian-11", "type": "NAMI", - "version": "1.5.4-2" + "version": "1.6.0-0" }, "render-template": { "arch": "amd64", diff --git a/bitnami/mongodb-sharded/6.0/debian-11/prebuildfs/opt/bitnami/scripts/libos.sh b/bitnami/mongodb-sharded/6.0/debian-11/prebuildfs/opt/bitnami/scripts/libos.sh index 08b1d4884c28..92530b32d94d 100644 --- a/bitnami/mongodb-sharded/6.0/debian-11/prebuildfs/opt/bitnami/scripts/libos.sh +++ b/bitnami/mongodb-sharded/6.0/debian-11/prebuildfs/opt/bitnami/scripts/libos.sh @@ -197,6 +197,8 @@ am_i_root() { # --version - Distro version # --branch - Distro branch # --codename - Distro codename +# --name - Distro name +# --pretty-name - Distro pretty name # Returns: # String ######################### @@ -223,6 +225,12 @@ get_os_metadata() { --codename) get_os_release_metadata VERSION_CODENAME ;; + --name) + get_os_release_metadata NAME + ;; + --pretty-name) + get_os_release_metadata PRETTY_NAME + ;; *) error "Unknown flag ${flag_name}" return 1 @@ -498,3 +506,50 @@ get_machine_id() { fi echo "$machine_id" } + +######################## +# Get the root partition's disk device ID (e.g. /dev/sda1) +# Globals: +# None +# Arguments: +# None +# Returns: +# Root partition disk ID +######################### +get_disk_device_id() { + local device_id="" + if grep -q ^/dev /proc/mounts; then + device_id="$(grep -q ^/dev /proc/mounts | awk '$2 == "/" { print $1 }' | tail -1)" + fi + # If it could not be autodetected, fallback to /dev/sda1 as a default + if [[ -z "$device_id" || ! -b "$device_id" ]]; then + device_id="/dev/sda1" + fi + echo "$device_id" +} + +######################## +# Get the root disk device ID (e.g. /dev/sda) +# Globals: +# None +# Arguments: +# None +# Returns: +# Root disk ID +######################### +get_root_disk_device_id() { + get_disk_device_id | sed 's/[0-9]\+$//' +} + +######################## +# Get the root disk size in bytes +# Globals: +# None +# Arguments: +# None +# Returns: +# Root disk size in bytes +######################### +get_root_disk_size() { + fdisk -l "$(get_root_disk_device_id)" | grep 'Disk.*bytes' | sed -E 's/.*, ([0-9]+) bytes,.*/\1/' || true +} diff --git a/bitnami/mongodb-sharded/6.0/debian-11/prebuildfs/usr/sbin/install_packages b/bitnami/mongodb-sharded/6.0/debian-11/prebuildfs/usr/sbin/install_packages index c9577647443b..77857a1a57f2 100755 --- a/bitnami/mongodb-sharded/6.0/debian-11/prebuildfs/usr/sbin/install_packages +++ b/bitnami/mongodb-sharded/6.0/debian-11/prebuildfs/usr/sbin/install_packages @@ -1,9 +1,10 @@ #!/bin/sh -set -e -set -u -export DEBIAN_FRONTEND=noninteractive +set -eu + n=0 max=2 +export DEBIAN_FRONTEND=noninteractive + until [ $n -gt $max ]; do set +e ( @@ -21,4 +22,4 @@ until [ $n -gt $max ]; do echo "apt failed, retrying" n=$(($n + 1)) done -rm -r /var/lib/apt/lists /var/cache/apt/archives +apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives diff --git a/bitnami/mongodb-sharded/README.md b/bitnami/mongodb-sharded/README.md index 6356e6a2c1ed..0744a7b4c2c4 100644 --- a/bitnami/mongodb-sharded/README.md +++ b/bitnami/mongodb-sharded/README.md @@ -45,7 +45,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/). -* [`6.0`, `6.0-debian-11`, `6.0.1`, `6.0.1-debian-11-r9`, `latest` (6.0/debian-11/Dockerfile)](https://github.com/bitnami/containers/blob/main/bitnami/mongodb/6.0/debian-11/Dockerfile) +* [`6.0`, `6.0-debian-11`, `6.0.1`, `6.0.1-debian-11-r10`, `latest` (6.0/debian-11/Dockerfile)](https://github.com/bitnami/containers/blob/main/bitnami/mongodb/6.0/debian-11/Dockerfile) * [`5.0`, `5.0-debian-11`, `5.0.12`, `5.0.12-debian-11-r5` (5.0/debian-11/Dockerfile)](https://github.com/bitnami/containers/blob/main/bitnami/mongodb/5.0/debian-11/Dockerfile) Subscribe to project updates by watching the [bitnami/containers GitHub repo](https://github.com/bitnami/containers).