Merge branch 'entrypoint-disambiguation

This commit is contained in:
Sameer Naik 2017-02-14 16:37:24 +05:30
commit ecf774b70a
2 changed files with 17 additions and 27 deletions

View File

@ -1,4 +1,4 @@
FROM gcr.io/stacksmith-images/minideb:jessie-r8
FROM gcr.io/stacksmith-images/minideb:jessie-r9
MAINTAINER Bitnami <containers@bitnami.com>
@ -19,6 +19,14 @@ RUN bitnami-pkg unpack redmine-3.3.2-0 --checksum 7488ba7ec4b015add6ac0293de8267
COPY rootfs /
ENV REDMINE_USERNAME=user \
REDMINE_PASSWORD=bitnami1 \
REDMINE_EMAIL=user@example.com \
REDMINE_LANGUAGE=en \
MARIADB_USER=root \
MARIADB_HOST=mariadb \
MARIADB_PORT=3306
VOLUME ["/bitnami/redmine"]
EXPOSE 3000

View File

@ -1,31 +1,13 @@
#!/bin/bash -e
. /opt/bitnami/base/functions
. /opt/bitnami/base/helpers
function initialize {
# Package can be "installed" or "unpacked"
status=`nami inspect $1`
if [[ "$status" == *'"lifecycle": "unpacked"'* ]]; then
inputs=""
if [[ -f /$1-inputs.json ]]; then
inputs=--inputs-file=/$1-inputs.json
fi
nami initialize $1 $inputs
fi
}
print_welcome_page
check_for_updates &
# Set default values
export REDMINE_USERNAME=${REDMINE_USERNAME:-"user"}
export REDMINE_PASSWORD=${REDMINE_PASSWORD:-"bitnami1"}
export REDMINE_EMAIL=${REDMINE_EMAIL:-"user@example.com"}
export REDMINE_LANGUAGE=${REDMINE_LANGUAGE:-"en"}
export MARIADB_USER=${MARIADB_USER:-"root"}
export MARIADB_HOST=${MARIADB_HOST:-"mariadb"}
export MARIADB_PORT=${MARIADB_PORT:-"3306"}
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
for module in redmine; do
initialize $module
done
echo "Starting application ..."
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
nami_initialize redmine
info "Starting redmine..."
fi
exec /entrypoint.sh "$@"
exec tini -- "$@"