mirror of
https://github.com/bitnami/containers.git
synced 2026-02-22 16:17:21 +08:00
1.8.3-debian-10-r94 release
This commit is contained in:
@@ -19,7 +19,7 @@ RUN chmod g+rwX /opt/bitnami
|
||||
COPY rootfs /
|
||||
RUN /opt/bitnami/scripts/influxdb/postunpack.sh
|
||||
ENV BITNAMI_APP_NAME="influxdb" \
|
||||
BITNAMI_IMAGE_VERSION="1.8.3-debian-10-r93" \
|
||||
BITNAMI_IMAGE_VERSION="1.8.3-debian-10-r94" \
|
||||
PATH="/opt/bitnami/common/bin:/opt/bitnami/influxdb/bin:$PATH"
|
||||
|
||||
VOLUME [ "/bitnami/influxdb" ]
|
||||
|
||||
@@ -37,14 +37,34 @@ group_exists() {
|
||||
# Create a group in the system if it does not exist already
|
||||
# Arguments:
|
||||
# $1 - group
|
||||
# Flags:
|
||||
# -s|--system - Whether to create new user as system user (uid <= 999)
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
ensure_group_exists() {
|
||||
local group="${1:?group is missing}"
|
||||
local is_system_user=false
|
||||
|
||||
# Validate arguments
|
||||
shift 1
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
-s|--system)
|
||||
is_system_user=true
|
||||
;;
|
||||
*)
|
||||
echo "Invalid command line flag $1" >&2
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if ! group_exists "$group"; then
|
||||
groupadd "$group" >/dev/null 2>&1
|
||||
local -a args=("$group")
|
||||
$is_system_user && args+=("--system")
|
||||
groupadd "${args[@]}" >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -52,22 +72,60 @@ ensure_group_exists() {
|
||||
# Create an user in the system if it does not exist already
|
||||
# Arguments:
|
||||
# $1 - user
|
||||
# $2 - group
|
||||
# Flags:
|
||||
# -g|--group - the group the new user should belong to
|
||||
# -h|--home - the home directory for the new user
|
||||
# -s|--system - whether to create new user as system user (uid <= 999)
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
ensure_user_exists() {
|
||||
local user="${1:?user is missing}"
|
||||
local group="${2:-}"
|
||||
local group=""
|
||||
local home=""
|
||||
local is_system_user=false
|
||||
|
||||
# Validate arguments
|
||||
shift 1
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
-g|--group)
|
||||
shift
|
||||
group="${1:?missing group}"
|
||||
;;
|
||||
-h|--home)
|
||||
shift
|
||||
home="${1:?missing home directory}"
|
||||
;;
|
||||
-s|--system)
|
||||
is_system_user=true
|
||||
;;
|
||||
*)
|
||||
echo "Invalid command line flag $1" >&2
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if ! user_exists "$user"; then
|
||||
useradd "$user" >/dev/null 2>&1
|
||||
local -a user_args=("-N" "$user")
|
||||
$is_system_user && user_args+=("--system")
|
||||
useradd "${user_args[@]}" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ -n "$group" ]]; then
|
||||
ensure_group_exists "$group"
|
||||
local -a group_args=("$group")
|
||||
$is_system_user && group_args+=("--system")
|
||||
ensure_group_exists "${group_args[@]}"
|
||||
usermod -a -G "$group" "$user" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ -n "$home" ]]; then
|
||||
mkdir -p "$home"
|
||||
usermod -d "$home" "$user" >/dev/null 2>&1
|
||||
configure_permissions_ownership "$home" -d "775" -f "664" -u "$user" -g "$group"
|
||||
fi
|
||||
}
|
||||
|
||||
########################
|
||||
|
||||
@@ -19,7 +19,7 @@ eval "$(influxdb_env)"
|
||||
influxdb_validate
|
||||
# Ensure InfluxDB user and group exist when running as 'root'
|
||||
if am_i_root; then
|
||||
ensure_user_exists "$INFLUXDB_DAEMON_USER" "$INFLUXDB_DAEMON_GROUP"
|
||||
ensure_user_exists "$INFLUXDB_DAEMON_USER" --group "$INFLUXDB_DAEMON_GROUP"
|
||||
chown -R "$INFLUXDB_DAEMON_USER" "$INFLUXDB_DATA_DIR" "$INFLUXDB_CONF_DIR"
|
||||
fi
|
||||
# Ensure InfluxDB is stopped when this script ends.
|
||||
|
||||
@@ -37,7 +37,7 @@ Bitnami containers can be used with [Kubeapps](https://kubeapps.com/) for deploy
|
||||
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/).
|
||||
|
||||
|
||||
* [`1`, `1-debian-10`, `1.8.3`, `1.8.3-debian-10-r93`, `latest` (1/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-influxdb/blob/1.8.3-debian-10-r93/1/debian-10/Dockerfile)
|
||||
* [`1`, `1-debian-10`, `1.8.3`, `1.8.3-debian-10-r94`, `latest` (1/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-influxdb/blob/1.8.3-debian-10-r94/1/debian-10/Dockerfile)
|
||||
|
||||
Subscribe to project updates by watching the [bitnami/influxdb GitHub repo](https://github.com/bitnami/bitnami-docker-influxdb).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user