2019.4.24-ol-7-r0 release
This commit is contained in:
parent
fe2e3288ef
commit
38c5462d4f
|
|
@ -0,0 +1,23 @@
|
|||
FROM bitnami/oraclelinux-extras-base:7-r267
|
||||
LABEL maintainer "Bitnami <containers@bitnami.com>"
|
||||
|
||||
ENV BITNAMI_PKG_CHMOD="-R g+rwX" \
|
||||
HOME="/" \
|
||||
OS_ARCH="x86_64" \
|
||||
OS_FLAVOUR="ol-7" \
|
||||
OS_NAME="linux"
|
||||
|
||||
# Install required system packages and dependencies
|
||||
RUN . ./libcomponent.sh && component_unpack "minio-client" "2019.4.24-0" --checksum b1760cfea1f357e9e941f5cca8c9128ff81dd26015eb2582acaae892885b188d
|
||||
|
||||
COPY rootfs /
|
||||
RUN /prepare.sh
|
||||
ENV BITNAMI_APP_NAME="minio-client" \
|
||||
BITNAMI_IMAGE_VERSION="2019.4.24-ol-7-r0" \
|
||||
NAMI_PREFIX="/.nami" \
|
||||
PATH="/opt/bitnami/minio-client/bin:$PATH"
|
||||
|
||||
WORKDIR /opt/bitnami/minio-client
|
||||
USER 1001
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
CMD [ "/run.sh" ]
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
version: '2'
|
||||
|
||||
services:
|
||||
minio-client:
|
||||
image: 'bitnami/minio-client:2019-ol-7'
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
#set -o xtrace
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
# Load libraries
|
||||
. /libbitnami.sh
|
||||
|
||||
print_welcome_page
|
||||
|
||||
info "** Starting MinIO Client setup **"
|
||||
/setup.sh
|
||||
info "** MinIO Client setup finished! **"
|
||||
|
||||
echo ""
|
||||
exec "/run.sh" "$@"
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Bitnami MinIO Client library
|
||||
|
||||
# Functions
|
||||
|
||||
########################
|
||||
# Load global variables used on MinIO Client configuration
|
||||
# Globals:
|
||||
# MINIO_CLIENT_*
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# Series of exports to be used as 'eval' arguments
|
||||
#########################
|
||||
minio_client_env() {
|
||||
cat <<"EOF"
|
||||
export MINIO_CLIENT_BASEDIR="/opt/bitnami/minio-client"
|
||||
export MINIO_CLIENT_CONFIGDIR="/.mc"
|
||||
export MINIO_SERVER_PORT="${MINIO_SERVER_PORT:-9000}"
|
||||
export MINIO_SERVER_ACCESS_KEY="${MINIO_SERVER_ACCESS_KEY:-}"
|
||||
export MINIO_SERVER_SECRET_KEY="${MINIO_SERVER_SECRET_KEY:-}"
|
||||
export PATH="${MINIO_CLIENT_BASEDIR}/bin:$PATH"
|
||||
EOF
|
||||
}
|
||||
|
||||
########################
|
||||
# Execute an arbitrary MinIO client command
|
||||
# Globals:
|
||||
# BITNAMI_DEBUG
|
||||
# MINIO_CLIENT_CONFIGDIR
|
||||
# Arguments:
|
||||
# $@ - Command to execute
|
||||
# Returns:
|
||||
# None
|
||||
minio_client_execute() {
|
||||
local args=("--config-dir" "${MINIO_CLIENT_CONFIGDIR}" "--quiet" "$@")
|
||||
local exec
|
||||
exec=$(command -v mc)
|
||||
|
||||
"${exec}" "${args[@]}"
|
||||
}
|
||||
|
||||
########################
|
||||
# Configure MinIO Client to use a MinIO server
|
||||
# Globals:
|
||||
# MINIO_SERVER_*
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# Series of exports to be used as 'eval' arguments
|
||||
#########################
|
||||
minio_client_configure_server() {
|
||||
if [[ -n "$MINIO_SERVER_HOST" ]] && [[ -n "$MINIO_SERVER_ACCESS_KEY" ]] && [[ -n "$MINIO_SERVER_SECRET_KEY" ]]; then
|
||||
info "Adding Minio host to 'mc' configuration..."
|
||||
minio_client_execute config host add minio "http://${MINIO_SERVER_HOST}:${MINIO_SERVER_PORT_NUMBER}" "${MINIO_SERVER_ACCESS_KEY}" "${MINIO_SERVER_SECRET_KEY}"
|
||||
fi
|
||||
}
|
||||
|
||||
########################
|
||||
# Configure MinIO Client to use a local MinIO server
|
||||
# Arguments:
|
||||
# $1 - MinIO server config_file
|
||||
# Returns:
|
||||
# Series of exports to be used as 'eval' arguments
|
||||
#########################
|
||||
minio_client_configure_local() {
|
||||
local config_file="${1:?missing config_file}"
|
||||
local access_key
|
||||
local secret_key
|
||||
|
||||
info "Adding local Minio host to 'mc' configuration..."
|
||||
if is_boolean_yes "$MINIO_DISTRIBUTED_MODE_ENABLED"; then
|
||||
# Access keys are set via environment variables in Distributed Mode
|
||||
minio_client_execute config host add local "http://localhost:${MINIO_SERVER_PORT_NUMBER}" "${MINIO_SERVER_ACCESS_KEY}" "${MINIO_SERVER_SECRET_KEY}"
|
||||
else
|
||||
access_key="$(jq -r .credential.accessKey < "${config_file}")"
|
||||
secret_key="$(jq -r .credential.secretKey < "${config_file}")"
|
||||
minio_client_execute config host add local "http://localhost:${MINIO_SERVER_PORT_NUMBER}" "${access_key}" "${secret_key}"
|
||||
fi
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
# Load libraries
|
||||
. /libfs.sh
|
||||
. /libminioclient.sh
|
||||
|
||||
# Load MinIO Client environment variables
|
||||
eval "$(minio_client_env)"
|
||||
|
||||
for dir in "$MINIO_CLIENT_BASEDIR" "$MINIO_CLIENT_CONFIGDIR"; do
|
||||
ensure_dir_exists "$dir"
|
||||
done
|
||||
chmod -R g+rwX "$MINIO_CLIENT_BASEDIR" "$MINIO_CLIENT_CONFIGDIR"
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
#set -o xtrace
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
# Load libraries
|
||||
. /liblog.sh
|
||||
. /libos.sh
|
||||
. /libminioclient.sh
|
||||
|
||||
# Load MinIO Client environment variables
|
||||
eval "$(minio_client_env)"
|
||||
|
||||
# Constants
|
||||
EXEC=$(command -v mc)
|
||||
ARGS=("--config-dir" "${MINIO_CLIENT_CONFIGDIR}" "$@")
|
||||
|
||||
if am_i_root; then
|
||||
exec gosu "${MINIO_CLIENT_DAEMON_USER}" "${EXEC}" "${ARGS[@]}"
|
||||
else
|
||||
exec "${EXEC}" "${ARGS[@]}"
|
||||
fi
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
#set -o xtrace
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
# Load libraries
|
||||
. /liblog.sh
|
||||
. /libnet.sh
|
||||
. /libminioclient.sh
|
||||
|
||||
# Load MinIO Client environment variables
|
||||
eval "$(minio_client_env)"
|
||||
|
||||
# Configure MinIO Client to use a MinIO server
|
||||
minio_client_configure_server
|
||||
Loading…
Reference in New Issue