mirror of
https://github.com/bitnami/containers.git
synced 2026-03-12 14:57:54 +08:00
4.9.7-php5-debian-9-r0 release
This commit is contained in:
51
bitnami/wordpress-nginx/4-php5/debian-9/Dockerfile
Normal file
51
bitnami/wordpress-nginx/4-php5/debian-9/Dockerfile
Normal file
@@ -0,0 +1,51 @@
|
||||
FROM bitnami/minideb-extras:stretch-r72
|
||||
LABEL maintainer "Bitnami <containers@bitnami.com>"
|
||||
|
||||
# Install required system packages and dependencies
|
||||
RUN install_packages libbz2-1.0 libc6 libcomerr2 libcurl3 libexpat1 libffi6 libfreetype6 libgcc1 libgcrypt20 libgmp10 libgnutls30 libgpg-error0 libgssapi-krb5-2 libhogweed4 libicu57 libidn11 libidn2-0 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblzma5 libmcrypt4 libncurses5 libnettle6 libnghttp2-14 libp11-kit0 libpcre3 libpng16-16 libpq5 libpsl5 libreadline7 librtmp1 libsasl2-2 libsqlite3-0 libssh2-1 libssl1.0.2 libssl1.1 libstdc++6 libsybdb5 libtasn1-6 libtidy5 libtinfo5 libunistring0 libxml2 libxslt1.1 zlib1g
|
||||
RUN bitnami-pkg unpack nginx-1.14.0-2 --checksum 9bc17f3a88adb34deb2a10e337b8112f0ff31c633bb09c9ec9b3b53948058043
|
||||
RUN bitnami-pkg unpack php-5.6.36-6 --checksum fedc289d35183c48efde37799bcf8d0e6922575a68e96afc7e214c785b47b0a9
|
||||
RUN bitnami-pkg unpack mysql-client-10.2.16-0 --checksum b340647cdff0f520aa3070c55756f43b2fc908369a76c9565bcefeb35a5ea66a
|
||||
RUN bitnami-pkg unpack wordpress-4.9.7-0 --checksum ffd319592e7024c18875e08473320953b2dee9ef308809cd173ec7e7a373f631
|
||||
|
||||
COPY rootfs /
|
||||
ENV ALLOW_EMPTY_PASSWORD="no" \
|
||||
BITNAMI_APP_NAME="wordpress-nginx" \
|
||||
BITNAMI_IMAGE_VERSION="4.9.7-php5-debian-9-r0" \
|
||||
MARIADB_HOST="mariadb" \
|
||||
MARIADB_PORT_NUMBER="3306" \
|
||||
MARIADB_ROOT_PASSWORD="" \
|
||||
MARIADB_ROOT_USER="root" \
|
||||
MYSQL_CLIENT_CREATE_DATABASE_NAME="" \
|
||||
MYSQL_CLIENT_CREATE_DATABASE_PASSWORD="" \
|
||||
MYSQL_CLIENT_CREATE_DATABASE_PRIVILEGES="ALL" \
|
||||
MYSQL_CLIENT_CREATE_DATABASE_USER="" \
|
||||
NGINX_DAEMON_GROUP="daemon" \
|
||||
NGINX_DAEMON_USER="daemon" \
|
||||
NGINX_HTTPS_PORT_NUMBER="443" \
|
||||
NGINX_HTTP_PORT_NUMBER="80" \
|
||||
PATH="/opt/bitnami/nginx/sbin:/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/mysql/bin:$PATH" \
|
||||
SMTP_HOST="" \
|
||||
SMTP_PASSWORD="" \
|
||||
SMTP_PORT="" \
|
||||
SMTP_PROTOCOL="" \
|
||||
SMTP_USER="" \
|
||||
SMTP_USERNAME="" \
|
||||
WORDPRESS_BLOG_NAME="User's Blog!" \
|
||||
WORDPRESS_DATABASE_NAME="bitnami_wordpress" \
|
||||
WORDPRESS_DATABASE_PASSWORD="" \
|
||||
WORDPRESS_DATABASE_USER="bn_wordpress" \
|
||||
WORDPRESS_EMAIL="user@example.com" \
|
||||
WORDPRESS_FIRST_NAME="FirstName" \
|
||||
WORDPRESS_HOST="" \
|
||||
WORDPRESS_HTTPS_PORT="443" \
|
||||
WORDPRESS_HTTP_PORT="80" \
|
||||
WORDPRESS_LAST_NAME="LastName" \
|
||||
WORDPRESS_PASSWORD="bitnami" \
|
||||
WORDPRESS_TABLE_PREFIX="wp_" \
|
||||
WORDPRESS_USERNAME="user"
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
ENTRYPOINT ["/app-entrypoint.sh"]
|
||||
CMD ["./run.sh"]
|
||||
31
bitnami/wordpress-nginx/4-php5/debian-9/docker-compose.yml
Normal file
31
bitnami/wordpress-nginx/4-php5/debian-9/docker-compose.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
version: '2'
|
||||
services:
|
||||
mariadb:
|
||||
image: 'bitnami/mariadb:latest'
|
||||
volumes:
|
||||
- 'mariadb_data:/bitnami'
|
||||
environment:
|
||||
- MARIADB_USER=bn_wordpress
|
||||
- MARIADB_DATABASE=bitnami_wordpress
|
||||
- ALLOW_EMPTY_PASSWORD=yes
|
||||
wordpress:
|
||||
image: 'bitnami/wordpress-nginx:4-php5'
|
||||
ports:
|
||||
- '80:80'
|
||||
- '443:443'
|
||||
volumes:
|
||||
- 'wordpress_data:/bitnami'
|
||||
- './wordpress-vhosts.conf:/bitnami/nginx/conf/vhosts/wordpress-vhosts.conf'
|
||||
depends_on:
|
||||
- mariadb
|
||||
environment:
|
||||
- MARIADB_HOST=mariadb
|
||||
- MARIADB_PORT_NUMBER=3306
|
||||
- WORDPRESS_DATABASE_USER=bn_wordpress
|
||||
- WORDPRESS_DATABASE_NAME=bitnami_wordpress
|
||||
- ALLOW_EMPTY_PASSWORD=yes
|
||||
volumes:
|
||||
mariadb_data:
|
||||
driver: local
|
||||
wordpress_data:
|
||||
driver: local
|
||||
14
bitnami/wordpress-nginx/4-php5/debian-9/rootfs/app-entrypoint.sh
Executable file
14
bitnami/wordpress-nginx/4-php5/debian-9/rootfs/app-entrypoint.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. /opt/bitnami/base/functions
|
||||
. /opt/bitnami/base/helpers
|
||||
|
||||
print_welcome_page
|
||||
|
||||
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "./run.sh" ]]; then
|
||||
. /init.sh
|
||||
nami_initialize nginx php mysql-client wordpress
|
||||
info "Starting wordpress... "
|
||||
fi
|
||||
|
||||
exec tini -- "$@"
|
||||
29
bitnami/wordpress-nginx/4-php5/debian-9/rootfs/init.sh
Normal file
29
bitnami/wordpress-nginx/4-php5/debian-9/rootfs/init.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
##
|
||||
## @brief Helper function to show an error when a password is empty and exit
|
||||
## param $1 Input name
|
||||
##
|
||||
empty_password_error() {
|
||||
error "The $1 environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow the container to be started with blank passwords. This is recommended only for development."
|
||||
exit 1
|
||||
}
|
||||
|
||||
##
|
||||
## @brief Helper function to show a warning when the ALLOW_EMPTY_PASSWORD flag is enabled
|
||||
##
|
||||
empty_password_enabled_warn() {
|
||||
warn "You set the environment variable ALLOW_EMPTY_PASSWORD=${ALLOW_EMPTY_PASSWORD}. For safety reasons, do not use this flag in a production environment."
|
||||
}
|
||||
|
||||
# Validate passwords
|
||||
if [[ "$ALLOW_EMPTY_PASSWORD" =~ ^(yes|Yes|YES)$ ]]; then
|
||||
empty_password_enabled_warn
|
||||
else
|
||||
# Database creation by MySQL client
|
||||
if [[ -n "$MYSQL_CLIENT_CREATE_DATABASE_USER" && -z "$MYSQL_CLIENT_CREATE_DATABASE_PASSWORD" ]]; then
|
||||
empty_password_error MYSQL_CLIENT_CREATE_DATABASE_PASSWORD
|
||||
fi
|
||||
# WordPress database
|
||||
if [[ -z "$WORDPRESS_DATABASE_PASSWORD" ]]; then
|
||||
empty_password_error WORDPRESS_DATABASE_PASSWORD
|
||||
fi
|
||||
fi
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"allowEmptyPassword": "{{$global.env.ALLOW_EMPTY_PASSWORD}}",
|
||||
"createDatabaseName": "{{$global.env.MYSQL_CLIENT_CREATE_DATABASE_NAME}}",
|
||||
"createDatabasePassword": "{{$global.env.MYSQL_CLIENT_CREATE_DATABASE_PASSWORD}}",
|
||||
"createDatabasePrivileges": "{{$global.env.MYSQL_CLIENT_CREATE_DATABASE_PRIVILEGES}}",
|
||||
"createDatabaseUser": "{{$global.env.MYSQL_CLIENT_CREATE_DATABASE_USER}}",
|
||||
"host": "{{$global.env.MARIADB_HOST}}",
|
||||
"port": "{{$global.env.MARIADB_PORT_NUMBER}}",
|
||||
"rootPassword": "{{$global.env.MARIADB_ROOT_PASSWORD}}",
|
||||
"rootUser": "{{$global.env.MARIADB_ROOT_USER}}"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"httpPort": "{{$global.env.NGINX_HTTP_PORT_NUMBER}}",
|
||||
"httpsPort": "{{$global.env.NGINX_HTTPS_PORT_NUMBER}}",
|
||||
"systemGroup": "{{$global.env.NGINX_DAEMON_GROUP}}",
|
||||
"systemUser": "{{$global.env.NGINX_DAEMON_USER}}"
|
||||
}
|
||||
15
bitnami/wordpress-nginx/4-php5/debian-9/rootfs/run.sh
Executable file
15
bitnami/wordpress-nginx/4-php5/debian-9/rootfs/run.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
_forwardTerm () {
|
||||
echo "Caugth signal SIGTERM, passing it to child processes..."
|
||||
cpids=$(pgrep -P $$ | xargs)
|
||||
kill -15 $cpids 2> /dev/null
|
||||
wait
|
||||
exit $?
|
||||
}
|
||||
|
||||
trap _forwardTerm TERM
|
||||
|
||||
nami start --foreground php &
|
||||
nami start --foreground nginx &
|
||||
wait
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"blogName": "{{$global.env.WORDPRESS_BLOG_NAME}}",
|
||||
"databaseName": "{{$global.env.WORDPRESS_DATABASE_NAME}}",
|
||||
"databasePassword": "{{$global.env.WORDPRESS_DATABASE_PASSWORD}}",
|
||||
"databaseServerHost": "{{$global.env.MARIADB_HOST}}",
|
||||
"databaseServerPort": "{{$global.env.MARIADB_PORT_NUMBER}}",
|
||||
"databaseUser": "{{$global.env.WORDPRESS_DATABASE_USER}}",
|
||||
"email": "{{$global.env.WORDPRESS_EMAIL}}",
|
||||
"firstName": "{{$global.env.WORDPRESS_FIRST_NAME}}",
|
||||
"host": "{{$global.env.WORDPRESS_HOST}}",
|
||||
"httpPort": "{{$global.env.WORDPRESS_HTTP_PORT}}",
|
||||
"httpsPort": "{{$global.env.WORDPRESS_HTTPS_PORT}}",
|
||||
"lastName": "{{$global.env.WORDPRESS_LAST_NAME}}",
|
||||
"password": "{{$global.env.WORDPRESS_PASSWORD}}",
|
||||
"smtpHost": "{{$global.env.SMTP_HOST}}",
|
||||
"smtpPassword": "{{$global.env.SMTP_PASSWORD}}",
|
||||
"smtpPort": "{{$global.env.SMTP_PORT}}",
|
||||
"smtpProtocol": "{{$global.env.SMTP_PROTOCOL}}",
|
||||
"smtpUser": "{{$global.env.SMTP_USER}}",
|
||||
"smtpUsername": "{{$global.env.SMTP_USERNAME}}",
|
||||
"tablePrefix": "{{$global.env.WORDPRESS_TABLE_PREFIX}}",
|
||||
"username": "{{$global.env.WORDPRESS_USERNAME}}"
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
server {
|
||||
listen 0.0.0.0:80;
|
||||
server_name myapp.example.com;
|
||||
|
||||
root /opt/bitnami/wordpress;
|
||||
index index.php;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?q=$uri&$args;
|
||||
}
|
||||
|
||||
if (!-e $request_filename)
|
||||
{
|
||||
rewrite ^/(.+)$ /index.php?q=$1 last;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass localhost:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user