From 42fb3350334bf2c4cd42159a9ebf85cb8a80102f Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Tue, 14 Feb 2017 15:37:45 +0530 Subject: [PATCH] entrypoint: remove references to `entrypoint.sh` from base image --- bitnami/redis/Dockerfile | 12 ++++++------ bitnami/redis/rootfs/app-entrypoint.sh | 24 ++++++++---------------- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/bitnami/redis/Dockerfile b/bitnami/redis/Dockerfile index 47e2d91af39d..5ed7bb215cd4 100644 --- a/bitnami/redis/Dockerfile +++ b/bitnami/redis/Dockerfile @@ -2,14 +2,14 @@ FROM gcr.io/stacksmith-images/minideb:jessie-r9 MAINTAINER Bitnami 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"] diff --git a/bitnami/redis/rootfs/app-entrypoint.sh b/bitnami/redis/rootfs/app-entrypoint.sh index e3a181aeba1e..6424c91a3684 100755 --- a/bitnami/redis/rootfs/app-entrypoint.sh +++ b/bitnami/redis/rootfs/app-entrypoint.sh @@ -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 -- "$@"