2.0.0-debian-10-r21 release

This commit is contained in:
Bitnami Bot
2020-06-25 15:30:08 +00:00
parent 2dac58c230
commit 67a8738b87
3 changed files with 22 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ ENV HOME="/" \
COPY prebuildfs /
# Install required system packages and dependencies
RUN install_packages ca-certificates curl gzip libc6 procps rpm tar
RUN install_packages acl ca-certificates curl gzip libc6 procps rpm tar
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "harbor-adapter-trivy" "2.0.0-1" --checksum d71b6cb9aab20375e91e9d82997703d4efe329e9df8d98491ccc7c5997fcd7b3
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "gosu" "1.12.0-0" --checksum 582d501eeb6b338a24f417fededbf14295903d6be55c52d66c52e616c81bcd8c
RUN apt-get update && apt-get upgrade -y && \
@@ -17,7 +17,7 @@ RUN apt-get update && apt-get upgrade -y && \
COPY rootfs /
RUN /opt/bitnami/scripts/harbor-adapter-trivy/postunpack.sh
ENV BITNAMI_APP_NAME="harbor-adapter-trivy" \
BITNAMI_IMAGE_VERSION="2.0.0-debian-10-r20" \
BITNAMI_IMAGE_VERSION="2.0.0-debian-10-r21" \
PATH="/opt/bitnami/harbor-adapter-trivy/bin:/opt/bitnami/common/bin:$PATH"
WORKDIR /opt/bitnami/harbor-adapter-trivy

View File

@@ -7,6 +7,7 @@
# Load Generic Libraries
. /opt/bitnami/scripts/libfs.sh
. /opt/bitnami/scripts/libos.sh
. /opt/bitnami/scripts/liblog.sh
. /opt/bitnami/scripts/libversion.sh
@@ -34,14 +35,28 @@ persist_app() {
warn "No files are configured to be persisted"
return
fi
local file_to_persist_origin file_to_persist_destination file_to_persist_destination_folder
pushd "$install_dir" >/dev/null
local file_to_persist_destination file_to_persist_destination_folder
local -r tmp_file="/tmp/perms.acl"
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"
# Get original permissions (except for the root directory, to avoid issues with volumes)
find "$file_to_persist" | grep -E -v '^\.$' | xargs getfacl -R > "$tmp_file"
# Copy directories to the volume
ensure_dir_exists "$file_to_persist_destination_folder"
cp -Lr --preserve=links "$file_to_persist" "$file_to_persist_destination_folder"
# Restore permissions
pushd "$persist_dir" >/dev/null
if am_i_root; then
setfacl --restore="$tmp_file"
else
# When running as non-root, don't change ownership
setfacl --restore=<(grep -E -v '^# (owner|group):' "$tmp_file")
fi
popd >/dev/null
done
popd >/dev/null
# Install the persisted files into the installation directory, via symlinks
restore_persisted_app "$@"
}

View File

@@ -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/).
* [`2-debian-10`, `2.0.0-debian-10-r20`, `2`, `2.0.0`, `latest` (2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-harbor-adapter-trivy/blob/2.0.0-debian-10-r20/2/debian-10/Dockerfile)
* [`2-debian-10`, `2.0.0-debian-10-r21`, `2`, `2.0.0`, `latest` (2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-harbor-adapter-trivy/blob/2.0.0-debian-10-r21/2/debian-10/Dockerfile)
Subscribe to project updates by watching the [bitnami/harbor-adapter-trivy GitHub repo](https://github.com/bitnami/bitnami-docker-harbor-adapter-trivy).