entrypoint: remove references to entrypoint.sh from base image

This commit is contained in:
Sameer Naik
2017-02-14 15:37:45 +05:30
parent 3c948d203d
commit 42fb335033
2 changed files with 14 additions and 22 deletions

View File

@@ -2,14 +2,14 @@ FROM gcr.io/stacksmith-images/minideb:jessie-r9
MAINTAINER Bitnami <containers@bitnami.com>
ENV BITNAMI_IMAGE_VERSION=3.2.8-r0 \
BITNAMI_APP_NAME=redis
BITNAMI_APP_NAME=redis \
PATH=/opt/bitnami/redis/bin:$PATH
# System packages required
RUN install_packages libc6
# Install redis
RUN bitnami-pkg unpack redis-3.2.8-0 --checksum 2dcd69c0bbcb6e2ab82975d39ee32c2795c612e85012d599d36553c4f5ab8f3d
ENV PATH=/opt/bitnami/redis/sbin:/opt/bitnami/redis/bin:$PATH
COPY rootfs /
@@ -19,10 +19,10 @@ ENV REDIS_PASSWORD= \
REDIS_MASTER_PORT=6379 \
REDIS_MASTER_PASSWORD=
ENTRYPOINT ["/app-entrypoint.sh"]
CMD ["nami", "start", "--foreground", "redis"]
VOLUME ["/bitnami/redis"]
EXPOSE 6379
ENTRYPOINT ["/app-entrypoint.sh"]
CMD ["nami", "start", "--foreground", "redis"]

View File

@@ -1,21 +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
# Clean up inputs
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 &
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
initialize redis
echo "Starting application ..."
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
nami_initialize redis
info "Starting redis..."
fi
exec /entrypoint.sh "$@"
exec tini -- "$@"