diff --git a/bitnami/wordpress/5/ol-7/Dockerfile b/bitnami/wordpress/5/ol-7/Dockerfile new file mode 100644 index 000000000000..734ec558fe5f --- /dev/null +++ b/bitnami/wordpress/5/ol-7/Dockerfile @@ -0,0 +1,54 @@ +FROM bitnami/oraclelinux-extras:7-r190 +LABEL maintainer "Bitnami " + +# Install required system packages and dependencies +RUN install_packages bzip2-libs cyrus-sasl-lib expat freetds freetype glibc gmp gnutls keyutils-libs krb5-libs libcom_err libcurl libffi libgcc libgcrypt libgpg-error libicu libidn libjpeg-turbo libmemcached libpng libselinux libssh2 libstdc++ libtasn1 libtidy libxml2 libxslt ncurses-libs nettle nspr nss nss-softokn-freebl nss-util openldap openssl-libs p11-kit pcre postgresql-libs readline sqlite xz-libs zlib +RUN bitnami-pkg unpack apache-2.4.37-1 --checksum 3220aa5e11f8a9914ddc3319235119b28da16c9a15ea33509feb40800d72d55b +RUN bitnami-pkg unpack php-7.2.13-0 --checksum 6538f97a065ced8478e8e9f0638f845800f2f30a199b0a12ae6641db213a19f7 +RUN bitnami-pkg install wp-cli-2.0.1-1 --checksum 2b1f3f295d110fcea1ddbb07aa6d4cb0f9897c89fb501234dc6b2ac2c70b7a35 +RUN bitnami-pkg unpack mysql-client-10.1.37-0 --checksum c1a94cb16b0325672c1c653d017f909e705a0be0efc46cc2a2a416d7e6a196da +RUN bitnami-pkg unpack libphp-7.2.13-0 --checksum beb8f0e55446eebdb09dd493fe5f8a14b4dee1d903bd7b6887250024e7f2178d +RUN bitnami-pkg unpack wordpress-5.0.0-0 --checksum dc764a8110a207ebfced8dc57fbf83276415289009da7afa406593b39685d950 +RUN mkdir -p /opt/bitnami/apache/tmp && chmod g+rwX /opt/bitnami/apache/tmp +RUN ln -sf /dev/stdout /opt/bitnami/apache/logs/access_log +RUN ln -sf /dev/stderr /opt/bitnami/apache/logs/error_log + +COPY rootfs / +ENV ALLOW_EMPTY_PASSWORD="no" \ + APACHE_HTTPS_PORT_NUMBER="443" \ + APACHE_HTTP_PORT_NUMBER="80" \ + BITNAMI_APP_NAME="wordpress" \ + BITNAMI_IMAGE_VERSION="5.0.0-ol-7-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="" \ + PATH="/opt/bitnami/apache/bin:/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/wp-cli/bin:/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 [ "httpd", "-f", "/bitnami/apache/conf/httpd.conf", "-DFOREGROUND" ] diff --git a/bitnami/wordpress/5/ol-7/docker-compose.yml b/bitnami/wordpress/5/ol-7/docker-compose.yml new file mode 100644 index 000000000000..05f25dcb217b --- /dev/null +++ b/bitnami/wordpress/5/ol-7/docker-compose.yml @@ -0,0 +1,30 @@ +version: '2' +services: + mariadb: + image: 'bitnami/mariadb:10.1-ol-7' + volumes: + - 'mariadb_data:/bitnami' + environment: + - MARIADB_USER=bn_wordpress + - MARIADB_DATABASE=bitnami_wordpress + - ALLOW_EMPTY_PASSWORD=yes + wordpress: + image: 'bitnami/wordpress:5-ol-7' + ports: + - '80:80' + - '443:443' + volumes: + - 'wordpress_data:/bitnami' + 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 diff --git a/bitnami/wordpress/5/ol-7/rootfs/apache-inputs.json b/bitnami/wordpress/5/ol-7/rootfs/apache-inputs.json new file mode 100644 index 000000000000..493f9fc7b0fa --- /dev/null +++ b/bitnami/wordpress/5/ol-7/rootfs/apache-inputs.json @@ -0,0 +1,4 @@ +{ + "httpPort": "{{$global.env.APACHE_HTTP_PORT_NUMBER}}", + "httpsPort": "{{$global.env.APACHE_HTTPS_PORT_NUMBER}}" +} \ No newline at end of file diff --git a/bitnami/wordpress/5/ol-7/rootfs/app-entrypoint.sh b/bitnami/wordpress/5/ol-7/rootfs/app-entrypoint.sh new file mode 100755 index 000000000000..20c8aa4bf823 --- /dev/null +++ b/bitnami/wordpress/5/ol-7/rootfs/app-entrypoint.sh @@ -0,0 +1,14 @@ +#!/bin/bash -e + +. /opt/bitnami/base/functions +. /opt/bitnami/base/helpers + +print_welcome_page + +if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "httpd" ]]; then + . /init.sh + nami_initialize apache php mysql-client libphp wordpress + info "Starting wordpress... " +fi + +exec tini -- "$@" diff --git a/bitnami/wordpress/5/ol-7/rootfs/init.sh b/bitnami/wordpress/5/ol-7/rootfs/init.sh new file mode 100644 index 000000000000..7e3fd71e04e9 --- /dev/null +++ b/bitnami/wordpress/5/ol-7/rootfs/init.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +## +## @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 diff --git a/bitnami/wordpress/5/ol-7/rootfs/mysql-client-inputs.json b/bitnami/wordpress/5/ol-7/rootfs/mysql-client-inputs.json new file mode 100644 index 000000000000..6a20ec0837a0 --- /dev/null +++ b/bitnami/wordpress/5/ol-7/rootfs/mysql-client-inputs.json @@ -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}}" +} \ No newline at end of file diff --git a/bitnami/wordpress/5/ol-7/rootfs/wordpress-inputs.json b/bitnami/wordpress/5/ol-7/rootfs/wordpress-inputs.json new file mode 100644 index 000000000000..7df5bc9916d8 --- /dev/null +++ b/bitnami/wordpress/5/ol-7/rootfs/wordpress-inputs.json @@ -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}}" +} \ No newline at end of file diff --git a/bitnami/wordpress/README.md b/bitnami/wordpress/README.md index c863e94e27e5..63b2231b6360 100644 --- a/bitnami/wordpress/README.md +++ b/bitnami/wordpress/README.md @@ -42,10 +42,10 @@ Bitnami containers can be used with [Kubeapps](https://kubeapps.com/) for deploy Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/). -* [`5-rhel-7`, `5.0.0-rhel-7-r0` (5/rhel-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-wordpress/blob/5.0.0-rhel-7-r0/5/rhel-7/Dockerfile) +* [`5-rhel-7`, `5.0.0-rhel-7-r-1` (5/rhel-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-wordpress/blob/5.0.0-rhel-7-r-1/5/rhel-7/Dockerfile) * [`5-php5-rhel-7`, `5.0.0-php5-rhel-7-r0` (5-php5/rhel-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-wordpress/blob/5.0.0-php5-rhel-7-r0/5-php5/rhel-7/Dockerfile) +* [`5-ol-7`, `5.0.0-ol-7-r0` (5/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-wordpress/blob/5.0.0-ol-7-r0/5/ol-7/Dockerfile) * [`5-debian-9`, `5.0.0-debian-9-r0`, `5`, `5.0.0`, `5.0.0-r0`, `latest` (5/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-wordpress/blob/5.0.0-debian-9-r0/5/debian-9/Dockerfile) -* [`5-ol-7`, `0.0.0-ol-7-r0` (5/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-wordpress/blob/0.0.0-ol-7-r0/5/ol-7/Dockerfile) Subscribe to project updates by watching the [bitnami/wordpress GitHub repo](https://github.com/bitnami/bitnami-docker-wordpress).