Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Example `docker-compose.yml` file (the last two lines should be added - the rest
image: thedxw/wpc-wordpress
ports:
- "80:80"
- "443:443"
links:
- mysql
- mailcatcher
Expand Down
21 changes: 18 additions & 3 deletions images/wordpress/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
FROM php:7.4-apache
FROM php:8.2-apache

RUN apt-get update && apt-get install -y --no-install-recommends clamav libmagickwand-dev libjpeg-dev libpng-dev vim-tiny less mariadb-client libgmp-dev libsodium-dev zlib1g-dev libzip-dev && rm -r /var/lib/apt/lists/* && freshclam

RUN pecl install imagick

RUN docker-php-ext-install mysqli && \
docker-php-ext-install gd && \
RUN docker-php-ext-install gd && \
docker-php-ext-install gmp && \
docker-php-ext-install sodium && \
docker-php-ext-install zip && \
Expand All @@ -16,6 +15,9 @@ RUN docker-php-ext-install mysqli && \
docker-php-ext-install exif &&\
docker-php-ext-install soap &&\
docker-php-ext-enable imagick && \
docker-php-ext-install pdo pdo_mysql &&\
docker-php-ext-install mysqli && \
docker-php-ext-enable mysqli && \
a2enmod rewrite

RUN curl --silent https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar > /usr/local/bin/wp-cli.phar
Expand All @@ -32,5 +34,18 @@ COPY wordpress.conf /etc/apache2/sites-enabled/
COPY mu-plugins /usr/src/mu-plugins/
COPY wp-config.php /var/www/html/wp-config.php

COPY openssl.cnf /etc/ssl/openssl.cnf
RUN openssl req -x509 -days 3650 -out /etc/ssl/certs/apache-localhost.crt \
-keyout /etc/ssl/private/apache-localhost.key \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=localhost' \
-extensions EXT \
-config /etc/ssl/openssl.cnf


COPY apache-https.conf /etc/apache2/sites-available/
RUN a2enmod ssl
RUN a2ensite apache-https

ENTRYPOINT ["wp-start"]
CMD ["apache2-foreground"]
8 changes: 8 additions & 0 deletions images/wordpress/apache-https.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<VirtualHost *:443>
DocumentRoot "/var/www/html"
ServerName localhost

SSLEngine on
SSLCertificateFile "/etc/ssl/certs/apache-localhost.crt"
SSLCertificateKeyFile "/etc/ssl/private/apache-localhost.key"
</VirtualHost>
9 changes: 9 additions & 0 deletions images/wordpress/openssl.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[dn]
CN=localhost
[req]
distinguished_name = dn
[EXT]
subjectAltName=DNS:localhost
keyUsage=digitalSignature
extendedKeyUsage=serverAuth

1 change: 1 addition & 0 deletions wpc
Submodule wpc added at f87574