mirror of
https://github.com/bitnami/containers.git
synced 2026-10-18 01:23:41 +02:00
[bitnami/wordpress-nginx] Release 6.1.1-debian-11-r45 (#24461)
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
@@ -2,11 +2,11 @@ FROM docker.io/bitnami/minideb:bullseye
|
||||
|
||||
ARG TARGETARCH
|
||||
|
||||
LABEL org.opencontainers.image.authors="https://bitnami.com/contact" \
|
||||
org.opencontainers.image.description="Application packaged by Bitnami" \
|
||||
LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bullseye" \
|
||||
org.opencontainers.image.created="2023-02-17T20:01:13Z" \
|
||||
org.opencontainers.image.description="Application packaged by VMware, Inc" \
|
||||
org.opencontainers.image.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.ref.name="6.1.1-debian-11-r44" \
|
||||
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/wordpress-nginx" \
|
||||
org.opencontainers.image.ref.name="6.1.1-debian-11-r45" \
|
||||
org.opencontainers.image.title="wordpress-nginx" \
|
||||
org.opencontainers.image.vendor="VMware, Inc." \
|
||||
org.opencontainers.image.version="6.1.1"
|
||||
@@ -22,12 +22,12 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN install_packages acl ca-certificates curl less libaudit1 libbrotli1 libbsd0 libbz2-1.0 libcap-ng0 libcom-err2 libcrypt1 libcurl4 libexpat1 libffi7 libfftw3-double3 libfontconfig1 libfreetype6 libgcc-s1 libgcrypt20 libgeoip1 libglib2.0-0 libgmp10 libgnutls30 libgomp1 libgpg-error0 libgssapi-krb5-2 libhogweed6 libicu67 libidn2-0 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblcms2-2 libldap-2.4-2 liblqr-1-0 libltdl7 liblzma5 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmd0 libmemcached11 libncurses6 libnettle8 libnghttp2-14 libonig5 libp11-kit0 libpam0g libpcre3 libpng16-16 libpq5 libpsl5 libreadline8 librtmp1 libsasl2-2 libsodium23 libsqlite3-0 libssh2-1 libssl1.1 libstdc++6 libsybdb5 libtasn1-6 libtidy5deb1 libtinfo6 libunistring2 libuuid1 libwebp6 libx11-6 libxau6 libxcb1 libxdmcp6 libxext6 libxml2 libxslt1.1 libzip4 procps zlib1g
|
||||
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
||||
COMPONENTS=( \
|
||||
"php-8.1.16-0-linux-${OS_ARCH}-debian-11" \
|
||||
"nginx-1.23.3-1-linux-${OS_ARCH}-debian-11" \
|
||||
"mysql-client-10.6.12-0-linux-${OS_ARCH}-debian-11" \
|
||||
"wordpress-6.1.1-27-linux-${OS_ARCH}-debian-11" \
|
||||
"render-template-1.0.5-0-linux-${OS_ARCH}-debian-11" \
|
||||
"gosu-1.16.0-1-linux-${OS_ARCH}-debian-11" \
|
||||
"php-8.1.16-1-linux-${OS_ARCH}-debian-11" \
|
||||
"nginx-1.23.3-2-linux-${OS_ARCH}-debian-11" \
|
||||
"mysql-client-10.6.12-1-linux-${OS_ARCH}-debian-11" \
|
||||
"wordpress-6.1.1-28-linux-${OS_ARCH}-debian-11" \
|
||||
"render-template-1.0.5-1-linux-${OS_ARCH}-debian-11" \
|
||||
"gosu-1.16.0-2-linux-${OS_ARCH}-debian-11" \
|
||||
) && \
|
||||
for COMPONENT in "${COMPONENTS[@]}"; do \
|
||||
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
|
||||
|
||||
+12
-12
@@ -1,44 +1,44 @@
|
||||
{
|
||||
"gosu": {
|
||||
"arch": "amd64",
|
||||
"digest": "9ab9654690d90d3c49ff66fb1eb286487e318adc899d036bc45922f6b176865b",
|
||||
"digest": "f6056076afb745fd7d9d87d20f71e7248d63330352cf5ae0be2130b7f44a8cfa",
|
||||
"distro": "debian-11",
|
||||
"type": "NAMI",
|
||||
"version": "1.16.0-1"
|
||||
"version": "1.16.0-2"
|
||||
},
|
||||
"mysql-client": {
|
||||
"arch": "amd64",
|
||||
"digest": "f1d55c82fe67003513561ab0b4c91f2e7699d4eaaa5d417dc4ed6be50cb4cbed",
|
||||
"digest": "dbc087bd90a6387956751464da45660229b3e7349b96099805e61dcbc2514853",
|
||||
"distro": "debian-11",
|
||||
"type": "NAMI",
|
||||
"version": "10.6.12-0"
|
||||
"version": "10.6.12-1"
|
||||
},
|
||||
"nginx": {
|
||||
"arch": "amd64",
|
||||
"digest": "bb184b4a6fa54bc7bf3fb5d2a861b8219c8769c7b21076fdfe9c74a641b0aa9b",
|
||||
"digest": "f9ec9c59605b25cc206cf6404764e106ecd0159e49a922e41175b95993c83506",
|
||||
"distro": "debian-11",
|
||||
"type": "NAMI",
|
||||
"version": "1.23.3-1"
|
||||
"version": "1.23.3-2"
|
||||
},
|
||||
"php": {
|
||||
"arch": "amd64",
|
||||
"digest": "cf3db32904b1b7359117477538ab174df76b2f065e5de5495ba223a8f21f40cd",
|
||||
"digest": "928131776dab0ecb6d22ccc2b0b5f790fa6886419b60f9b4beb489f70dc76342",
|
||||
"distro": "debian-11",
|
||||
"type": "NAMI",
|
||||
"version": "8.1.16-0"
|
||||
"version": "8.1.16-1"
|
||||
},
|
||||
"render-template": {
|
||||
"arch": "amd64",
|
||||
"digest": "57c1d857acbb187fcb98f4ba26d138af9d866f59ad38dd443a75c0a6422de994",
|
||||
"digest": "185e277977366ec222d2bde1a395ffa138ce1a9d3bdf1df20c3e49e8b8f9c68b",
|
||||
"distro": "debian-11",
|
||||
"type": "NAMI",
|
||||
"version": "1.0.5-0"
|
||||
"version": "1.0.5-1"
|
||||
},
|
||||
"wordpress": {
|
||||
"arch": "amd64",
|
||||
"digest": "b94830f7064a48ad986b2f6d6ebf9cd34dc3d6141cf0fa7dbe06e5deccb030c0",
|
||||
"digest": "76a2003a77cb3c4313e7fcca1777fdfc858487a8fa5dc1a29dce63052458c842",
|
||||
"distro": "debian-11",
|
||||
"type": "NAMI",
|
||||
"version": "6.1.1-27"
|
||||
"version": "6.1.1-28"
|
||||
}
|
||||
}
|
||||
@@ -196,7 +196,7 @@ nginx_initialize() {
|
||||
nginx_configure_port "$NGINX_HTTP_PORT_NUMBER"
|
||||
fi
|
||||
# Configure HTTPS port number
|
||||
if [[ -n "${NGINX_HTTPS_PORT_NUMBER:-}" ]]; then
|
||||
if [[ -n "${NGINX_HTTPS_PORT_NUMBER:-}" ]] && [[ -f "${NGINX_SERVER_BLOCKS_DIR}/default-https-server-block.conf" ]]; then
|
||||
nginx_configure_port "$NGINX_HTTPS_PORT_NUMBER" "${NGINX_SERVER_BLOCKS_DIR}/default-https-server-block.conf"
|
||||
fi
|
||||
nginx_configure "absolute_redirect" "$(is_boolean_yes "$NGINX_ENABLE_ABSOLUTE_REDIRECT" && echo "on" || echo "off" )"
|
||||
|
||||
@@ -348,34 +348,7 @@ wordpress_initialize() {
|
||||
is_boolean_yes "$WORDPRESS_ENABLE_MULTISITE" && wp_execute site meta update "$default_site_id" fileupload_maxk "$WORDPRESS_MULTISITE_FILEUPLOAD_MAXK"
|
||||
# Enable friendly URLs / permalinks (using historic Bitnami defaults)
|
||||
wp_execute rewrite structure '/%year%/%monthnum%/%day%/%postname%/'
|
||||
if ! is_empty_value "$WORDPRESS_SMTP_HOST"; then
|
||||
info "Configuring SMTP settings"
|
||||
wp_execute option set mail_from "$WORDPRESS_SMTP_USER"
|
||||
wp_execute option set mail_from_name "${WORDPRESS_FIRST_NAME} ${WORDPRESS_LAST_NAME}"
|
||||
wp_execute option set mailer "smtp"
|
||||
wp_execute option set mail_set_return_path ""
|
||||
wp_execute option set smtp_host "$WORDPRESS_SMTP_HOST"
|
||||
wp_execute option set smtp_port "$WORDPRESS_SMTP_PORT_NUMBER"
|
||||
wp_execute option set smtp_ssl "$WORDPRESS_SMTP_PROTOCOL"
|
||||
wp_execute option set smtp_auth "true"
|
||||
wp_execute option set smtp_user "$WORDPRESS_SMTP_USER"
|
||||
wp_execute option set smtp_pass "$WORDPRESS_SMTP_PASSWORD"
|
||||
# Enable wp-mail-smtp plugin, which is required for SMTP to work
|
||||
info "Enabling wp-mail-smtp plugin"
|
||||
local -a install_smtp_plugin_args
|
||||
if is_boolean_yes "$WORDPRESS_ENABLE_MULTISITE"; then
|
||||
install_smtp_plugin_args=("--activate-network")
|
||||
else
|
||||
install_smtp_plugin_args=("--activate")
|
||||
fi
|
||||
wp_execute plugin install wp-mail-smtp "${install_smtp_plugin_args[@]}"
|
||||
# Delete default SMTP credentials created when enabling the plugin
|
||||
# If not deleted, the previously configured credentials will not be taken into account
|
||||
# and the user will be forced to re-launch the plugin wizard right after logging in the admin panel
|
||||
local wp_mail_options_to_delete
|
||||
read -r -a wp_mail_options_to_delete <<<"$(wp_execute_print_output option list --search='*wp_mail*' --field=option_name | tr '\n' ' ')"
|
||||
wp_execute option delete "${wp_mail_options_to_delete[@]}"
|
||||
fi
|
||||
! is_empty_value "$WORDPRESS_SMTP_HOST" && wordpress_configure_smtp
|
||||
else
|
||||
info "An already initialized WordPress database was provided, configuration will be skipped"
|
||||
wp_execute core update-db
|
||||
@@ -668,6 +641,37 @@ EOF
|
||||
wordpress_conf_set "WP_SITEURL" "$wp_url_string" yes
|
||||
}
|
||||
|
||||
########################
|
||||
# Configure SMTP
|
||||
# Globals:
|
||||
# *
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
wordpress_configure_smtp() {
|
||||
info "Enabling wp-mail-smtp plugin"
|
||||
local -a install_smtp_plugin_args
|
||||
if is_boolean_yes "$WORDPRESS_ENABLE_MULTISITE"; then
|
||||
install_smtp_plugin_args=("--activate-network")
|
||||
else
|
||||
install_smtp_plugin_args=("--activate")
|
||||
fi
|
||||
wp_execute plugin install wp-mail-smtp "${install_smtp_plugin_args[@]}"
|
||||
info "Configuring SMTP settings"
|
||||
wp_execute option patch update wp_mail_smtp mail from_email "$WORDPRESS_SMTP_USER"
|
||||
wp_execute option patch update wp_mail_smtp mail from_name "${WORDPRESS_FIRST_NAME} ${WORDPRESS_LAST_NAME}"
|
||||
wp_execute option patch update wp_mail_smtp mail mailer "smtp"
|
||||
wp_execute option patch insert wp_mail_smtp smtp host "$WORDPRESS_SMTP_HOST"
|
||||
wp_execute option patch insert wp_mail_smtp smtp port "$WORDPRESS_SMTP_PORT_NUMBER"
|
||||
wp_execute option patch insert wp_mail_smtp smtp encryption "$WORDPRESS_SMTP_PROTOCOL"
|
||||
wp_execute option patch insert wp_mail_smtp smtp user "$WORDPRESS_SMTP_USER"
|
||||
wp_execute option patch insert wp_mail_smtp smtp pass "$WORDPRESS_SMTP_PASSWORD"
|
||||
# Prevent WP Mail SMTP wizard to be launched after logging in the admin panel
|
||||
wp_execute option set wp_mail_smtp_activation_prevent_redirect 1
|
||||
}
|
||||
|
||||
########################
|
||||
# Apply web server configuration to host WordPress
|
||||
# Globals:
|
||||
|
||||
@@ -31,7 +31,7 @@ nginx_custom_init_scripts
|
||||
! am_i_root || chmod o+w "$(readlink /dev/stdout)" "$(readlink /dev/stderr)"
|
||||
|
||||
# Configure HTTPS port number
|
||||
if [[ -n "${NGINX_HTTPS_PORT_NUMBER:-}" ]] && [[ ! -f "${NGINX_SERVER_BLOCKS_DIR}/default-https-server-block.conf" ]] || is_dir_empty "${NGINX_SERVER_BLOCKS_DIR}"; then
|
||||
if [[ -n "${NGINX_HTTPS_PORT_NUMBER:-}" ]] && [[ ! -f "${NGINX_SERVER_BLOCKS_DIR}/default-https-server-block.conf" ]] && is_file_writable "${NGINX_SERVER_BLOCKS_DIR}/default-https-server-block.conf"; then
|
||||
cp "${BITNAMI_ROOT_DIR}/scripts/nginx/server_blocks/default-https-server-block.conf" "${NGINX_SERVER_BLOCKS_DIR}/default-https-server-block.conf"
|
||||
fi
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
[Overview of WordPress with NGINX](http://www.wordpress.org)
|
||||
|
||||
|
||||
|
||||
## TL;DR
|
||||
|
||||
```console
|
||||
@@ -84,7 +86,7 @@ docker network create wordpress-network
|
||||
#### Step 2: Create a volume for MariaDB persistence and create a MariaDB container
|
||||
|
||||
```console
|
||||
docker volume create --name mariadb_data
|
||||
$ docker volume create --name mariadb_data
|
||||
docker run -d --name mariadb \
|
||||
--env ALLOW_EMPTY_PASSWORD=yes \
|
||||
--env MARIADB_USER=bn_wordpress \
|
||||
@@ -98,7 +100,7 @@ docker run -d --name mariadb \
|
||||
#### Step 3: Create volumes for WordPress persistence and launch the container
|
||||
|
||||
```console
|
||||
docker volume create --name wordpress_data
|
||||
$ docker volume create --name wordpress_data
|
||||
docker run -d --name wordpress \
|
||||
-p 8080:8080 -p 8443:8443 \
|
||||
--env ALLOW_EMPTY_PASSWORD=yes \
|
||||
@@ -206,7 +208,7 @@ When you start the WordPress image, you can adjust the configuration of the inst
|
||||
- For manual execution add a `--env` option with each variable and value:
|
||||
|
||||
```console
|
||||
docker run -d --name wordpress -p 80:8080 -p 443:8443 \
|
||||
$ docker run -d --name wordpress -p 80:8080 -p 443:8443 \
|
||||
--env WORDPRESS_PASSWORD=my_password \
|
||||
--network wordpress-tier \
|
||||
--volume /path/to/wordpress-persistence:/bitnami \
|
||||
@@ -239,7 +241,7 @@ Available environment variables:
|
||||
- `WORDPRESS_AUTO_UPDATE_LEVEL`: Level of auto-updates to allow for the WordPress core installation. Valid values: `major`, `minor`, `none`. Default: **none**
|
||||
- `WORDPRESS_ENABLE_REVERSE_PROXY`: Enable WordPress support for reverse proxy headers. Default: **no**
|
||||
|
||||
##### Multisite configuration
|
||||
#### Multisite configuration
|
||||
|
||||
- `WORDPRESS_ENABLE_MULTISITE`: Enable WordPress Multisite configuration. Default: **no**
|
||||
- `WORDPRESS_MULTISITE_HOST`: WordPress hostname/address. Only used for Multisite installations. No defaults.
|
||||
@@ -249,7 +251,7 @@ Available environment variables:
|
||||
- `WORDPRESS_MULTISITE_ENABLE_NIP_IO_REDIRECTION`: Whether to enable IP address redirection to nip.io wildcard DNS when enabling WordPress Multisite. This is useful when running on an IP address with subdomain network type. Default: **no**
|
||||
- `WORDPRESS_MULTISITE_FILEUPLOAD_MAXK`: Maximum upload file size allowed for WordPress Multisite uploads, in kilobytes. Default: **81920**
|
||||
|
||||
##### Database connection configuration
|
||||
#### Database connection configuration
|
||||
|
||||
- `WORDPRESS_DATABASE_HOST`: Hostname for the MariaDB or MySQL server. Default: **mariadb**
|
||||
- `WORDPRESS_DATABASE_PORT_NUMBER`: Port used by the MariaDB or MySQL server. Default: **3306**
|
||||
@@ -263,7 +265,7 @@ Available environment variables:
|
||||
- `WORDPRESS_DATABASE_SSL_CA_FILE`: Path to the database server CA bundle file. No defaults
|
||||
- `ALLOW_EMPTY_PASSWORD`: It can be used to allow blank passwords. Default: **no**
|
||||
|
||||
##### Create a database for WordPress using mysql-client
|
||||
#### Create a database for WordPress using mysql-client
|
||||
|
||||
- `MYSQL_CLIENT_FLAVOR`: SQL database flavor. Valid values: `mariadb` or `mysql`. Default: **mariadb**
|
||||
- `MYSQL_CLIENT_DATABASE_HOST`: Hostname for the MariaDB or MySQL server. Default: **mariadb**
|
||||
@@ -282,7 +284,7 @@ Available environment variables:
|
||||
- `MYSQL_CLIENT_SSL_KEY_FILE`: Path to the SSL CA file for the new database. No defaults
|
||||
- `ALLOW_EMPTY_PASSWORD`: It can be used to allow blank passwords. Default: **no**
|
||||
|
||||
##### SMTP Configuration
|
||||
#### SMTP Configuration
|
||||
|
||||
To configure WordPress to send email using SMTP you can set the following environment variables:
|
||||
|
||||
@@ -291,7 +293,7 @@ To configure WordPress to send email using SMTP you can set the following enviro
|
||||
- `WORDPRESS_SMTP_USER`: SMTP account user.
|
||||
- `WORDPRESS_SMTP_PASSWORD`: SMTP account password.
|
||||
|
||||
##### PHP configuration
|
||||
#### PHP configuration
|
||||
|
||||
- `PHP_ENABLE_OPCACHE`: Enable OPcache for PHP scripts. Default: **yes**
|
||||
- `PHP_EXPOSE_PHP`: Enables HTTP header with PHP version. No default.
|
||||
@@ -327,7 +329,7 @@ This would be an example of SMTP configuration using a Gmail account:
|
||||
- For manual execution:
|
||||
|
||||
```console
|
||||
docker run -d --name wordpress -p 80:8080 -p 443:8443 \
|
||||
$ docker run -d --name wordpress -p 80:8080 -p 443:8443 \
|
||||
--env WORDPRESS_DATABASE_USER=bn_wordpress \
|
||||
--env WORDPRESS_DATABASE_NAME=bitnami_wordpress \
|
||||
--env WORDPRESS_SMTP_HOST=smtp.gmail.com \
|
||||
@@ -362,7 +364,7 @@ The Bitnami WordPress container supports connecting the WordPress application to
|
||||
- For manual execution:
|
||||
|
||||
```console
|
||||
docker run -d --name wordpress\
|
||||
$ docker run -d --name wordpress\
|
||||
-p 8080:8080 -p 8443:8443 \
|
||||
--network wordpress-network \
|
||||
--env WORDPRESS_DATABASE_HOST=mariadb_host \
|
||||
@@ -446,7 +448,7 @@ Restoring a backup is as simple as mounting the backup as volumes in the contain
|
||||
For the MariaDB database container:
|
||||
|
||||
```diff
|
||||
docker run -d --name mariadb \
|
||||
$ docker run -d --name mariadb \
|
||||
...
|
||||
- --volume /path/to/mariadb-persistence:/bitnami/mariadb \
|
||||
+ --volume /path/to/mariadb-backups/latest:/bitnami/mariadb \
|
||||
@@ -456,7 +458,7 @@ For the MariaDB database container:
|
||||
For the WordPress container:
|
||||
|
||||
```diff
|
||||
docker run -d --name wordpress \
|
||||
$ docker run -d --name wordpress \
|
||||
...
|
||||
- --volume /path/to/wordpress-persistence:/bitnami/wordpress \
|
||||
+ --volume /path/to/wordpress-backups/latest:/bitnami/wordpress \
|
||||
|
||||
Reference in New Issue
Block a user