Deprecate branch 7 (#36)

This commit is contained in:
Francisco de Paz Galán
2021-06-23 20:39:43 +02:00
committed by GitHub
parent 161e708ebe
commit f8474bedcf
13 changed files with 0 additions and 588 deletions

View File

@@ -1,53 +0,0 @@
FROM docker.io/bitnami/minideb:buster
LABEL maintainer "Bitnami <containers@bitnami.com>"
ENV PATH="/opt/bitnami/postgresql/bin:/opt/bitnami/java/bin:/opt/bitnami/common/bin:/opt/bitnami/sonarqube/bin/linux-x86-64/:/opt/bitnami/nami/bin:$PATH"
COPY prebuildfs /
# Install required system packages and dependencies
RUN install_packages ca-certificates curl gzip libblkid1 libbsd0 libc6 libedit2 libffi6 libgcc1 libglib2.0-0 libgmp10 libgnutls30 libhogweed4 libicu63 libidn2-0 libldap-2.4-2 liblzma5 libmount1 libnettle6 libp11-kit0 libpcre3 libsasl2-2 libselinux1 libssl1.1 libstdc++6 libtasn1-6 libtinfo6 libunistring2 libuuid1 libxml2 libxslt1.1 procps sudo tar zlib1g
RUN /build/bitnami-user.sh
RUN /build/install-nami.sh
RUN bitnami-pkg unpack postgresql-client-10.17.0-0 --checksum b1c2a23c7d904b8968f8264dbbe0816cb1d6f5475cce3da620f823752c129266
RUN bitnami-pkg install java-11.0.11-0 --checksum 8cf28afc1090b0fec1ad841012ead25b59d2d5f4212742c3d62e6007ef57850b
RUN bitnami-pkg install tini-0.19.0-1 --checksum 9b1f1c095944bac88a62c1b63f3bff1bb123aa7ccd371c908c0e5b41cec2528d
RUN bitnami-pkg unpack sonarqube-7.9.6-0 --checksum 2fc4de6311fe97798e6c909d92ff09817812d092c5f7ae98d64bf1cc92e6124d
RUN bitnami-pkg install gosu-1.13.0-0 --checksum fd7257c2736164d02832dbf72e2c1ed9d875bf3e32f0988520796bc503330129
COPY rootfs /
ENV BITNAMI_APP_NAME="sonarqube" \
BITNAMI_IMAGE_VERSION="7.9.6-debian-10-r93" \
OS_ARCH="amd64" \
OS_FLAVOUR="debian-10" \
OS_NAME="linux" \
POSTGRESQL_CLIENT_CREATE_DATABASE_NAME="" \
POSTGRESQL_CLIENT_CREATE_DATABASE_PASSWORD="" \
POSTGRESQL_CLIENT_CREATE_DATABASE_USERNAME="" \
POSTGRESQL_HOST="postgresql" \
POSTGRESQL_PORT_NUMBER="5432" \
POSTGRESQL_ROOT_PASSWORD="" \
POSTGRESQL_ROOT_USER="postgres" \
SMTP_HOST="" \
SMTP_PASSWORD="" \
SMTP_PORT="" \
SMTP_PROTOCOL="" \
SMTP_USER="" \
SONARQUBE_CE_JAVA_ADD_OPTS="" \
SONARQUBE_DATABASE_NAME="bitnami_sonarqube" \
SONARQUBE_DATABASE_PASSWORD="" \
SONARQUBE_DATABASE_USER="bn_sonarqube" \
SONARQUBE_ELASTICSEARCH_JAVA_ADD_OPTS="" \
SONARQUBE_ELASTICSEARCH_PORT_NUMBER="9001" \
SONARQUBE_ENABLE_DEMO_DATA="no" \
SONARQUBE_PASSWORD="bitnami" \
SONARQUBE_PORT_NUMBER="9000" \
SONARQUBE_PROPERTIES="" \
SONARQUBE_START_TIMEOUT="300" \
SONARQUBE_USERNAME="admin" \
SONARQUBE_WEB_CONTEXT="/" \
SONARQUBE_WEB_JAVA_ADD_OPTS=""
EXPOSE 9000
ENTRYPOINT [ "/app-entrypoint.sh" ]
CMD [ "nami", "start", "--foreground", "sonarqube" ]

View File

@@ -1,29 +0,0 @@
version: '2'
services:
postgresql:
image: docker.io/bitnami/postgresql:10
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- 'postgresql_data:/bitnami/postgresql'
sonarqube:
image: docker.io/bitnami/sonarqube:7
ports:
- '80:9000'
environment:
- POSTGRESQL_HOST=postgresql
- POSTGRESQL_ROOT_USER=postgres
- POSTGRESQL_CLIENT_CREATE_DATABASE_NAME=bitnami_sonarqube
- POSTGRESQL_CLIENT_CREATE_DATABASE_USERNAME=bn_sonarqube
- POSTGRESQL_CLIENT_CREATE_DATABASE_PASSWORD=bitnami1234
- SONARQUBE_DATABASE_NAME=bitnami_sonarqube
- SONARQUBE_DATABASE_USER=bn_sonarqube
- SONARQUBE_DATABASE_PASSWORD=bitnami1234
volumes:
- sonarqube_data:/bitnami
volumes:
sonarqube_data:
driver: local
postgresql_data:
driver: local

View File

@@ -1,6 +0,0 @@
#!/bin/bash
useradd -ms /bin/bash bitnami
mkdir -p /opt/bitnami
sed -i -e 's/\s*Defaults\s*secure_path\s*=/# Defaults secure_path=/' /etc/sudoers
echo 'bitnami ALL=NOPASSWD: ALL' >> /etc/sudoers

View File

@@ -1,7 +0,0 @@
#!/bin/bash
curl --silent -L https://nami-prod.s3.amazonaws.com/tools/nami/releases/nami-2.0.1-0-linux-x64.tar.gz > /tmp/nami-linux-x64.tar.gz
echo "05e6e1e86cbb419cd80f832650ad06d97bcabca2c3a9e953e81b2674a29cc94e /tmp/nami-linux-x64.tar.gz" | sha256sum --check
mkdir -p /opt/bitnami/nami /opt/bitnami/licenses
tar xzf /tmp/nami-linux-x64.tar.gz --strip 1 -C /opt/bitnami/nami && rm /tmp/nami-linux-x64.tar.gz
curl --silent -L https://raw.githubusercontent.com/bitnami/nami/master/COPYING > /opt/bitnami/licenses/nami-2.0.1-0.txt

View File

@@ -1,37 +0,0 @@
{
"gosu": {
"arch": "amd64",
"digest": "fd7257c2736164d02832dbf72e2c1ed9d875bf3e32f0988520796bc503330129",
"distro": "debian-10",
"type": "NAMI",
"version": "1.13.0-0"
},
"java": {
"arch": "amd64",
"digest": "8cf28afc1090b0fec1ad841012ead25b59d2d5f4212742c3d62e6007ef57850b",
"distro": "debian-10",
"type": "NAMI",
"version": "11.0.11-0"
},
"postgresql-client": {
"arch": "amd64",
"digest": "b1c2a23c7d904b8968f8264dbbe0816cb1d6f5475cce3da620f823752c129266",
"distro": "debian-10",
"type": "NAMI",
"version": "10.17.0-0"
},
"sonarqube": {
"arch": "amd64",
"digest": "2fc4de6311fe97798e6c909d92ff09817812d092c5f7ae98d64bf1cc92e6124d",
"distro": "debian-10",
"type": "NAMI",
"version": "7.9.6-0"
},
"tini": {
"arch": "amd64",
"digest": "9b1f1c095944bac88a62c1b63f3bff1bb123aa7ccd371c908c0e5b41cec2528d",
"distro": "debian-10",
"type": "NAMI",
"version": "0.19.0-1"
}
}

View File

@@ -1,120 +0,0 @@
#!/bin/bash
[[ ${BASH_DEBUG:-false} = true ]] && set -x
# Constants
MODULE="$(basename "$0")"
BITNAMI_PREFIX=/opt/bitnami
# Color Palette
RESET='\033[0m'
BOLD='\033[1m'
## Foreground
BLACK='\033[38;5;0m'
RED='\033[38;5;1m'
GREEN='\033[38;5;2m'
YELLOW='\033[38;5;3m'
BLUE='\033[38;5;4m'
MAGENTA='\033[38;5;5m'
CYAN='\033[38;5;6m'
WHITE='\033[38;5;7m'
## Background
ON_BLACK='\033[48;5;0m'
ON_RED='\033[48;5;1m'
ON_GREEN='\033[48;5;2m'
ON_YELLOW='\033[48;5;3m'
ON_BLUE='\033[48;5;4m'
ON_MAGENTA='\033[48;5;5m'
ON_CYAN='\033[48;5;6m'
ON_WHITE='\033[48;5;7m'
# Functions
########################
# Print to STDERR
# Arguments:
# Message to print
# Returns:
# None
#########################
stderr_print() {
printf "%b\\n" "${*}" >&2
}
########################
# Log message
# Arguments:
# Message to log
# Returns:
# None
#########################
log() {
stderr_print "${NAMI_DEBUG:+${CYAN}${MODULE:-} ${MAGENTA}$(date "+%T.%2N ")}${RESET}${*}"
}
########################
# Log an 'info' message
# Arguments:
# Message to log
# Returns:
# None
#########################
info() {
log "${GREEN}INFO ${RESET} ==> ${*}"
}
########################
# Log message
# Arguments:
# Message to log
# Returns:
# None
#########################
warn() {
log "${YELLOW}WARN ${RESET} ==> ${*}"
}
########################
# Log an 'error' message
# Arguments:
# Message to log
# Returns:
# None
#########################
error() {
log "${RED}ERROR${RESET} ==> ${*}"
}
########################
# Print the welcome page
# Globals:
# DISABLE_WELCOME_MESSAGE
# BITNAMI_APP_NAME
# Arguments:
# None
# Returns:
# None
#########################
print_welcome_page() {
if [[ -z "${DISABLE_WELCOME_MESSAGE:-}" ]]; then
if [[ -n "$BITNAMI_APP_NAME" ]]; then
print_image_welcome_page
fi
fi
}
########################
# Print the welcome page for a Bitnami Docker image
# Globals:
# BITNAMI_APP_NAME
# Arguments:
# None
# Returns:
# None
#########################
print_image_welcome_page() {
local github_url="https://github.com/bitnami/bitnami-docker-${BITNAMI_APP_NAME}"
log ""
log "${BOLD}Welcome to the Bitnami ${BITNAMI_APP_NAME} container${RESET}"
log "Subscribe to project updates by watching ${BOLD}${github_url}${RESET}"
log "Submit issues and feature requests at ${BOLD}${github_url}/issues${RESET}"
log ""
}

View File

@@ -1,40 +0,0 @@
#!/bin/bash
. /opt/bitnami/base/functions
########################
# Helper function to initialize a single nami module
# Arguments:
# Module to initialize
# Returns:
# None
# Description:
# Initialize an unpacked nami module with the `nami initialize` command.
# Command arguments can be specified as function argumnts after the module name.
# `--log-level trace` flag is added to the command if `NAMI_DEBUG` env variable exists.
# The log level can be overridden using the `NAMI_LOG_LEVEL` env variable.
#########################
nami_initialize_one() {
local module="${1:?module not specified}"
if nami inspect $module | grep -q '"lifecycle": "unpacked"'; then
local inputs=
if [[ -f "/${module}-inputs.json" ]]; then
inputs="--inputs-file=/${module}-inputs.json"
fi
nami ${NAMI_DEBUG:+--log-level ${NAMI_LOG_LEVEL:-trace}} initialize $module $inputs "${@:2}"
fi
}
########################
# Helper function to initialize one or more nami modules
# Arguments:
# Module to initialize
# Returns:
# None
#########################
nami_initialize() {
local module="${1:?module not specified}"
for module in "${@}"; do
nami_initialize_one $module
done
}

View File

@@ -1,3 +0,0 @@
Bitnami containers ship with software bundles. You can find the licenses under:
/opt/bitnami/nami/COPYING
/opt/bitnami/[name-of-bundle]/licenses/[bundle-version].txt

View File

@@ -1,222 +0,0 @@
#!/bin/bash -e
. /opt/bitnami/base/functions
print_usage() {
log "Usage: bitnami-pkg <COMMAND> <PACKAGE>-<VERSION> [OPTIONS] -- [ARGS]"
log ""
log "Download and install Bitnami packages"
log ""
log "Commands:"
log " install Download and install a package."
log " unpack Download and unpack a package."
log ""
log "Options:"
log " -b, --bucket Package release bucket (default: stacksmith)."
log " -c, --checksum SHA256 verification checksum."
log " -h, --help Show this help message and exit."
log ""
log "If the package is already available in the /tmp/bitnami/pkg/cache/"
log "directory, the download will be skipped. If there is a corresponding"
log "file of the same name post-fixed with .sha256 in the directory,"
log "that sha will be used instead of the --checksum option."
log ""
log "Examples:"
log " - Unpack package"
log " \$ bitnami-pkg unpack nginx-1.9.10-0"
log ""
log " - Verify and Install package"
log " \$ bitnami-pkg install nginx-1.9.10-0 --checksum 15565d06b18c2e3710fc08e579ddb3d0e39aa663264a0f7404f0743cb4cdb58d"
log ""
log " - Install package with arguments"
log " \$ bitnami-pkg install mariadb-10.1.11-0 -- --password bitnami"
log ""
log " - Install package from testing"
log " \$ bitnami-pkg install mariadb-10.1.11-0 --bucket testing"
log ""
}
identify_distro() {
distro="${IMAGE_OS:-unknown}"
if [ "${distro}" == "unknown" -a -f /etc/os-release ]; then
distro="$(grep "^ID=" /etc/os-release | cut -d'=' -f2 | cut -d'"' -f2)-$(grep "^VERSION_ID=" /etc/os-release | cut -d'=' -f2 | cut -d'"' -f2 | cut -d'.' -f1)"
fi
echo "$distro"
}
identify_arch() {
local arch=$(uname -m)
case "${arch}" in
ppc64le) ;;
# no-op
x86_64)
case $(identify_distro) in
debian-*)
arch=amd64
;;
ubuntu-*)
arch=amd64
;;
ol-*)
arch=x86_64
;;
centos-*)
arch=x86_64
;;
rhel-*)
arch=x86_64
;;
photon-*)
arch=x86_64
;;
esac
;;
*)
arch="unknown"
;;
esac
echo $arch
}
# break up command line for easy parsing and check legal options
ARGS=$(getopt -o b:c:h -l "bucket:,checksum:,help" -n "bitnami-pkg" -- "$@")
if [ $? -ne 0 ]; then
exit 1
fi
eval set -- "$ARGS"
while true; do
case "$1" in
-b | --bucket)
shift
if [ -n "$1" ]; then
RELEASE_BUCKET=$1
shift
fi
;;
-c | --checksum)
shift
if [ -n "$1" ]; then
PACKAGE_SHA256=$1
shift
fi
;;
-h | --help)
print_usage
exit 0
;;
--)
shift
break
;;
esac
done
# weed out unrecognized commands
case "$1" in
install | unpack) ;;
*)
error "Unrecognized command: $1"
print_usage
exit 1
;;
esac
# install/unpack command need to be supplied a package name
if [ $# -lt 2 ]; then
print_usage
exit 1
fi
INSTALL_ROOT=/tmp/bitnami/pkg/install
CACHE_ROOT=/tmp/bitnami/pkg/cache
PACKAGE="$2-linux-$(identify_arch)-$(identify_distro)"
PACKAGE_ARGS=${@:3}
PACKAGE_NAME=$(echo $PACKAGE | sed 's/-[0-9].*//')
RELEASE_BUCKET=${RELEASE_BUCKET:-stacksmith}
mkdir -p $INSTALL_ROOT
cd $INSTALL_ROOT
info "Downloading $PACKAGE package"
if [ -f $CACHE_ROOT/$PACKAGE.tar.gz ]; then
info "$CACHE_ROOT/$PACKAGE.tar.gz already exists, skipping download."
cp $CACHE_ROOT/$PACKAGE.tar.gz .
if [ -f $CACHE_ROOT/$PACKAGE.tar.gz.sha256 ]; then
info "Using the local sha256 from $CACHE_ROOT/$PACKAGE.tar.gz.sha256"
PACKAGE_SHA256=$(cat $CACHE_ROOT/$PACKAGE.tar.gz.sha256)
fi
else
# display cURL progress bar when a tty is attached
if tty -s; then
CURL_ARGS="-#"
else
CURL_ARGS="-sS"
fi
if ! curl $CURL_ARGS -LOf "https://downloads.bitnami.com/files/$RELEASE_BUCKET/$PACKAGE.tar.gz"; then
warn "Package name '$PACKAGE' does not exist, will try '${PACKAGE%-$(identify_distro)}'..."
if curl $CURL_ARGS -LOf "https://downloads.bitnami.com/files/$RELEASE_BUCKET/${PACKAGE%-$(identify_distro)}.tar.gz"; then
PACKAGE="${PACKAGE%-$(identify_distro)}"
else
error "Could not find the requested package..."
exit 1
fi
fi
fi
if ! tar tzf $PACKAGE.tar.gz >/dev/null 2>&1; then
error "Invalid or corrupt '$PACKAGE' package."
exit 1
fi
if [ "$PACKAGE_SHA256" ]; then
info "Verifying package integrity"
echo "$PACKAGE_SHA256 $PACKAGE.tar.gz" | sha256sum -c -
fi
# If the tarball has too many files, it can trigger a bug
# in overlayfs when using tar. Install bsdtar in the container image
# to workaround it. As the overhead is too big (~40 MB), it is not added by
# default. Source: https://github.com/coreos/bugs/issues/1095
if which bsdtar >/dev/null 2>&1; then
bsdtar -xf $PACKAGE.tar.gz
else
tar xzf $PACKAGE.tar.gz
fi
case "$1" in
install) info "Installing $PACKAGE" ;;
unpack) info "Unpacking $PACKAGE" ;;
esac
nami $1 $PACKAGE $PACKAGE_ARGS
if [[ $PACKAGE =~ git-.* ]]; then
# Due to a nami unpack issue, git binaries are copied instead of using hard symlinks.
# This workaround overwrites these binaries with the original ones, preserving links
# and saving ~500 MB
info "Patching ${PACKAGE}"
cp -a --force "${INSTALL_ROOT}/${PACKAGE}/files/git/." "/opt/bitnami/git"
fi
rm -rf $INSTALL_ROOT
if [ "$BITNAMI_PKG_EXTRA_DIRS" ]; then
info "Creating extra directories"
for i in ${BITNAMI_PKG_EXTRA_DIRS}; do
mkdir -p $i
done
fi
if [ "$BITNAMI_PKG_CHMOD" ]; then
DIRS="/.nami /bitnami $BITNAMI_PKG_EXTRA_DIRS"
if ! [[ $PACKAGE_NAME =~ .*-client ]]; then
mkdir -p /bitnami/$PACKAGE_NAME
fi
# We need to be in $HOME in order to nami inspect works
cd $HOME
DIRS+=" $(nami inspect $PACKAGE_NAME | grep -e '"installdir"' | cut -f4 -d\")"
info "Fixing permissions: chmod $BITNAMI_PKG_CHMOD $DIRS"
chmod $BITNAMI_PKG_CHMOD $DIRS
fi

View File

@@ -1,24 +0,0 @@
#!/bin/sh
set -e
set -u
export DEBIAN_FRONTEND=noninteractive
n=0
max=2
until [ $n -gt $max ]; do
set +e
(
apt-get update -qq &&
apt-get install -y --no-install-recommends "$@"
)
CODE=$?
set -e
if [ $CODE -eq 0 ]; then
break
fi
if [ $n -eq $max ]; then
exit $CODE
fi
echo "apt failed, retrying"
n=$(($n + 1))
done
rm -r /var/lib/apt/lists /var/cache/apt/archives

View File

@@ -1,13 +0,0 @@
#!/bin/bash -e
. /opt/bitnami/base/functions
. /opt/bitnami/base/helpers
print_welcome_page
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
nami_initialize postgresql-client sonarqube
info "Starting gosu... "
fi
exec tini -- "$@"

View File

@@ -1,9 +0,0 @@
{
"database": "{{$global.env.POSTGRESQL_CLIENT_CREATE_DATABASE_NAME}}",
"databaseAdminPassword": "{{$global.env.POSTGRESQL_ROOT_PASSWORD}}",
"databaseAdminUser": "{{$global.env.POSTGRESQL_ROOT_USER}}",
"host": "{{$global.env.POSTGRESQL_HOST}}",
"password": "{{$global.env.POSTGRESQL_CLIENT_CREATE_DATABASE_PASSWORD}}",
"port": "{{$global.env.POSTGRESQL_PORT_NUMBER}}",
"username": "{{$global.env.POSTGRESQL_CLIENT_CREATE_DATABASE_USERNAME}}"
}

View File

@@ -1,25 +0,0 @@
{
"databaseAdminPassword": "{{$global.env.POSTGRESQL_ROOT_PASSWORD}}",
"databaseAdminUser": "{{$global.env.POSTGRESQL_ROOT_USER}}",
"databaseName": "{{$global.env.SONARQUBE_DATABASE_NAME}}",
"databaseServerHost": "{{$global.env.POSTGRESQL_HOST}}",
"databaseServerPort": "{{$global.env.POSTGRESQL_PORT_NUMBER}}",
"databaseUser": "{{$global.env.SONARQUBE_DATABASE_USER}}",
"databaseUserPassword": "{{$global.env.SONARQUBE_DATABASE_PASSWORD}}",
"elasticsearchPort": "{{$global.env.SONARQUBE_ELASTICSEARCH_PORT_NUMBER}}",
"enableDemoData": "{{$global.env.SONARQUBE_ENABLE_DEMO_DATA}}",
"password": "{{$global.env.SONARQUBE_PASSWORD}}",
"port": "{{$global.env.SONARQUBE_PORT_NUMBER}}",
"smtpHost": "{{$global.env.SMTP_HOST}}",
"smtpPassword": "{{$global.env.SMTP_PASSWORD}}",
"smtpPort": "{{$global.env.SMTP_PORT}}",
"smtpProtocol": "{{$global.env.SMTP_PROTOCOL}}",
"smtpUser": "{{$global.env.SMTP_USER}}",
"sonarqubeCEJavaAdditionalOpts": "{{$global.env.SONARQUBE_CE_JAVA_ADD_OPTS}}",
"sonarqubeProperties": "{{$global.env.SONARQUBE_PROPERTIES}}",
"sonarqubeSearchJavaAdditionalOpts": "{{$global.env.SONARQUBE_ELASTICSEARCH_JAVA_ADD_OPTS}}",
"sonarqubeWebContext": "{{$global.env.SONARQUBE_WEB_CONTEXT}}",
"sonarqubeWebJavaAdditionalOpts": "{{$global.env.SONARQUBE_WEB_JAVA_ADD_OPTS}}",
"startTimeout": "{{$global.env.SONARQUBE_START_TIMEOUT}}",
"username": "{{$global.env.SONARQUBE_USERNAME}}"
}