Standalone Wordpress on sqlite. Ready to be used.
528
Wordpress on sqlite. Standalone and ready to be used. Not the ideal setup for large instalations but for a few people good enough.
I recommend reverse proxying the 8081 port to a SSL enabled proxy like nginx or haproxy.
# Default stuffs
FROM centos
MAINTAINER [email protected]
# Install apache, php, sqlite and php stuff for owncloud
RUN yum install -y httpd php sqlite php-dom php-mbstring php-gd php-pdo tar gzip unzip
# Download Wordpress and sqlite-integration and extract them to /var/www/html
ADD https://wordpress.org/latest.tar.gz /var/www/
ADD https://downloads.wordpress.org/plugin/sqlite-integration.1.8.zip /var/www/
RUN tar xz -f /var/www/latest.tar.gz -C /var/www/html/ --strip=1
RUN unzip /var/www/sqlite-integration.1.8.zip -d /var/www/html/wp-content/plugins/
# Configure sqlite-integration
RUN mv /var/www/html/wp-content/plugins/sqlite-integration/db.php /var/www/html/wp-content/.
RUN mkdir /var/www/html/wp-content/database
# Rename wp-config.php
RUN mv /var/www/html/wp-config-sample.php /var/www/html/wp-config.php
# Generate random keys and salts
RUN sed -i "s|\('AUTH_KEY', \)\('put your unique phrase here'\)|\1'$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;)'|" /var/www/html/wp-config.php && \
sed -i "s|\('SECURE_AUTH_KEY', *\)\('put your unique phrase here'\)|\1'$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;)'|" /var/www/html/wp-config.php && \
sed -i "s|\('LOGGED_IN_KEY', *\)\('put your unique phrase here'\)|\1'$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;)'|" /var/www/html/wp-config.php && \
sed -i "s|\('NONCE_KEY', *\)\('put your unique phrase here'\)|\1'$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;)'|" /var/www/html/wp-config.php && \
sed -i "s|\('AUTH_SALT', *\)\('put your unique phrase here'\)|\1'$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;)'|" /var/www/html/wp-config.php && \
sed -i "s|\('SECURE_AUTH_SALT', *\)\('put your unique phrase here'\)|\1'$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;)'|" /var/www/html/wp-config.php && \
sed -i "s|\('LOGGED_IN_SALT', *\)\('put your unique phrase here'\)|\1'$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;)'|" /var/www/html/wp-config.php && \
sed -i "s|\('NONCE_SALT', *\)\('put your unique phrase here'\)|\1'$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;)'|" /var/www/html/wp-config.php
# Set default_charset to UTF-8 in /etc/php.ini
RUN sed -i 's/.*;default_charset = "UTF-8".*/default_charset = "UTF-8"/' /etc/php.ini
# Set owner of /var/www/html to apache
RUN chown -R apache:apache /var/www/html/
# Run apache in foreground
CMD ["apachectl", "-D", "FOREGROUND"]
docker build --rm -t cael/wordpress .
docker run --restart="always" -d -p 8081:80 cael/wordpress
Content type
Image
Digest
sha256:73a0e508d…
Size
154.3 MB
Last updated
almost 11 years ago
docker pull cael/wordpress