2.3.3-debian-10-r13 release
This commit is contained in:
parent
edc9ff0587
commit
b37cd17e35
|
|
@ -18,7 +18,7 @@ RUN chmod g+rwX /opt/bitnami
|
|||
COPY rootfs /
|
||||
RUN /opt/bitnami/scripts/harbor-registryctl/postunpack.sh
|
||||
ENV BITNAMI_APP_NAME="harbor-registryctl" \
|
||||
BITNAMI_IMAGE_VERSION="2.3.3-debian-10-r12" \
|
||||
BITNAMI_IMAGE_VERSION="2.3.3-debian-10-r13" \
|
||||
PATH="/opt/bitnami/harbor-registry/bin:/opt/bitnami/common/bin:/opt/bitnami/harbor-registryctl/bin:$PATH"
|
||||
|
||||
VOLUME [ "/etc/registry", "/etc/registryctl", "/storage", "/var/lib/registry" ]
|
||||
|
|
|
|||
|
|
@ -39,18 +39,24 @@ group_exists() {
|
|||
# Arguments:
|
||||
# $1 - group
|
||||
# Flags:
|
||||
# -i|--gid - the ID for the new group
|
||||
# -s|--system - Whether to create new user as system user (uid <= 999)
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
ensure_group_exists() {
|
||||
local group="${1:?group is missing}"
|
||||
local gid=""
|
||||
local is_system_user=false
|
||||
|
||||
# Validate arguments
|
||||
shift 1
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
-i|--gid)
|
||||
shift
|
||||
gid="${1:?missing gid}"
|
||||
;;
|
||||
-s|--system)
|
||||
is_system_user=true
|
||||
;;
|
||||
|
|
@ -64,6 +70,13 @@ ensure_group_exists() {
|
|||
|
||||
if ! group_exists "$group"; then
|
||||
local -a args=("$group")
|
||||
if [[ -n "$gid" ]]; then
|
||||
if group_exists "$gid" ; then
|
||||
error "The GID $gid is already in use." >&2
|
||||
return 1
|
||||
fi
|
||||
args+=("--gid" "$gid")
|
||||
fi
|
||||
$is_system_user && args+=("--system")
|
||||
groupadd "${args[@]}" >/dev/null 2>&1
|
||||
fi
|
||||
|
|
@ -74,7 +87,9 @@ ensure_group_exists() {
|
|||
# Arguments:
|
||||
# $1 - user
|
||||
# Flags:
|
||||
# -i|--uid - the ID for the new user
|
||||
# -g|--group - the group the new user should belong to
|
||||
# -a|--append-groups - comma-separated list of supplemental groups to append to the new user
|
||||
# -h|--home - the home directory for the new user
|
||||
# -s|--system - whether to create new user as system user (uid <= 999)
|
||||
# Returns:
|
||||
|
|
@ -82,7 +97,9 @@ ensure_group_exists() {
|
|||
#########################
|
||||
ensure_user_exists() {
|
||||
local user="${1:?user is missing}"
|
||||
local uid=""
|
||||
local group=""
|
||||
local append_groups=""
|
||||
local home=""
|
||||
local is_system_user=false
|
||||
|
||||
|
|
@ -90,10 +107,18 @@ ensure_user_exists() {
|
|||
shift 1
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
-i|--uid)
|
||||
shift
|
||||
uid="${1:?missing uid}"
|
||||
;;
|
||||
-g|--group)
|
||||
shift
|
||||
group="${1:?missing group}"
|
||||
;;
|
||||
-a|--append-groups)
|
||||
shift
|
||||
append_groups="${1:?missing append_groups}"
|
||||
;;
|
||||
-h|--home)
|
||||
shift
|
||||
home="${1:?missing home directory}"
|
||||
|
|
@ -111,7 +136,15 @@ ensure_user_exists() {
|
|||
|
||||
if ! user_exists "$user"; then
|
||||
local -a user_args=("-N" "$user")
|
||||
$is_system_user && user_args+=("--system")
|
||||
if [[ -n "$uid" ]]; then
|
||||
if user_exists "$uid" ; then
|
||||
error "The UID $uid is already in use."
|
||||
return 1
|
||||
fi
|
||||
user_args+=("--uid" "$uid")
|
||||
else
|
||||
$is_system_user && user_args+=("--system")
|
||||
fi
|
||||
useradd "${user_args[@]}" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
|
|
@ -122,6 +155,15 @@ ensure_user_exists() {
|
|||
usermod -g "$group" "$user" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ -n "$append_groups" ]]; then
|
||||
local -a groups
|
||||
read -ra groups <<< "$(tr ',;' ' ' <<< "$append_groups")"
|
||||
for group in "${groups[@]}"; do
|
||||
ensure_group_exists "$group"
|
||||
usermod -aG "$group" "$user" >/dev/null 2>&1
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ -n "$home" ]]; then
|
||||
mkdir -p "$home"
|
||||
usermod -d "$home" "$user" >/dev/null 2>&1
|
||||
|
|
@ -403,3 +445,4 @@ generate_sha_hash() {
|
|||
local -r algorithm="${2:-1}"
|
||||
echo -n "$str" | "sha${algorithm}sum" | awk '{print $1}'
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,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`, `2-debian-10`, `2.3.3`, `2.3.3-debian-10-r12`, `latest` (2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-harbor-registryctl/blob/2.3.3-debian-10-r12/2/debian-10/Dockerfile)
|
||||
* [`2`, `2-debian-10`, `2.3.3`, `2.3.3-debian-10-r13`, `latest` (2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-harbor-registryctl/blob/2.3.3-debian-10-r13/2/debian-10/Dockerfile)
|
||||
|
||||
# Configuration
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue