mirror of
https://github.com/bitnami/containers.git
synced 2026-02-24 07:07:37 +08:00
Merge branch 'entrypoint-disambiguation
This commit is contained in:
@@ -1,25 +1,28 @@
|
||||
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
|
||||
|
||||
# Install apache
|
||||
RUN bitnami-pkg unpack apache-2.4.25-0 --checksum 8b46af7d737772d7d301da8b30a2770b7e549674e33b8a5b07480f53c39f5c3f
|
||||
RUN ln -sf /opt/bitnami/$BITNAMI_APP_NAME/htdocs /app
|
||||
|
||||
ENV PATH=/opt/bitnami/$BITNAMI_APP_NAME/sbin:/opt/bitnami/$BITNAMI_APP_NAME/bin:/opt/bitnami/common/bin:$PATH
|
||||
RUN ln -sf /opt/bitnami/apache/htdocs /app
|
||||
|
||||
COPY rootfs/ /
|
||||
ENTRYPOINT ["/app-entrypoint.sh"]
|
||||
CMD ["nami", "start", "--foreground", "apache"]
|
||||
|
||||
VOLUME ["/bitnami/$BITNAMI_APP_NAME"]
|
||||
ENV APACHE_HTTP_PORT=80 \
|
||||
APACHE_HTTPS_PORT=443
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
VOLUME ["/bitnami/apache"]
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
ENTRYPOINT ["/app-entrypoint.sh"]
|
||||
|
||||
CMD ["nami", "start", "--foreground", "apache"]
|
||||
|
||||
@@ -1,26 +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 &
|
||||
|
||||
# Set default values
|
||||
export APACHE_HTTP_PORT=${APACHE_HTTP_PORT:-80}
|
||||
export APACHE_HTTPS_PORT=${APACHE_HTTPS_PORT:-443}
|
||||
|
||||
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 -- "$@"
|
||||
|
||||
Reference in New Issue
Block a user