entrypoint: remove references to entrypoint.sh from base image

This commit is contained in:
Sameer Naik
2017-02-13 17:07:57 +05:30
parent a48a5c4be6
commit 8ffe8c6309
2 changed files with 13 additions and 23 deletions

View File

@@ -1,9 +1,9 @@
FROM gcr.io/stacksmith-images/minideb:jessie-r8
FROM gcr.io/stacksmith-images/minideb:jessie-r9
MAINTAINER Bitnami <containers@bitnami.com>
ENV BITNAMI_IMAGE_VERSION=2.4.25-r1 \
BITNAMI_APP_NAME=apache \
BITNAMI_APP_USER=daemon
PATH=/opt/bitnami/apache/bin:$PATH
# System packages required
RUN install_packages libssl1.0.0 libaprutil1 libapr1 libc6 libuuid1 libexpat1 libpcre3 libldap-2.4-2 libsasl2-2 libgnutls-deb0-28 zlib1g libp11-kit0 libtasn1-6 libnettle4 libhogweed2 libgmp10 libffi6
@@ -12,17 +12,15 @@ RUN install_packages libssl1.0.0 libaprutil1 libapr1 libc6 libuuid1 libexpat1 li
RUN bitnami-pkg unpack apache-2.4.25-0 --checksum 8b46af7d737772d7d301da8b30a2770b7e549674e33b8a5b07480f53c39f5c3f
RUN ln -sf /opt/bitnami/apache/htdocs /app
ENV PATH=/opt/bitnami/apache/sbin:/opt/bitnami/apache/bin:/opt/bitnami/common/bin:$PATH
COPY rootfs/ /
ENV APACHE_HTTP_PORT=80 \
APACHE_HTTPS_PORT=443
VOLUME ["/bitnami/apache"]
WORKDIR /app
VOLUME ["/bitnami/apache"]
EXPOSE 80 443
ENTRYPOINT ["/app-entrypoint.sh"]

View File

@@ -1,22 +1,14 @@
#!/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 apache
chown -R :$BITNAMI_APP_USER /bitnami/apache || true
echo "Starting application ..."
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
nami_initialize apache
chown -R :daemon /bitnami/apache || true
info "Starting apache..."
fi
exec /entrypoint.sh "$@"
exec tini -- "$@"