forked from soulteary/docker-sqlite-wordpress
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (17 loc) · 1.3 KB
/
Dockerfile
File metadata and controls
21 lines (17 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM wordpress:latest
VOLUME /var/www/html
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV WORDPRESS_PREPARE_DIR=/usr/src/wordpress
RUN apt-get update -y && apt-get upgrade && apt-get install zip -y
RUN curl -L -o sqlite-database-integration.zip "https://downloads.wordpress.org/plugin/sqlite-database-integration.latest-stable.zip" && \
unzip sqlite-database-integration.zip && \
mkdir -p ${WORDPRESS_PREPARE_DIR}/wp-content/mu-plugins/sqlite-database-integration && \
cp -r sqlite-database-integration/* ${WORDPRESS_PREPARE_DIR}/wp-content/mu-plugins/sqlite-database-integration/ && \
rm -rf sqlite-database-integration && \
rm -rf sqlite-database-integration.zip && \
mv "${WORDPRESS_PREPARE_DIR}/wp-content/mu-plugins/sqlite-database-integration/db.copy" "${WORDPRESS_PREPARE_DIR}/wp-content/db.php" && \
sed -i 's#{SQLITE_IMPLEMENTATION_FOLDER_PATH}#/var/www/html/wp-content/mu-plugins/sqlite-database-integration#' "${WORDPRESS_PREPARE_DIR}/wp-content/db.php" && \
sed -i 's#{SQLITE_PLUGIN}#sqlite-database-integration/load.php#' "${WORDPRESS_PREPARE_DIR}/wp-content/db.php" && \
mkdir "${WORDPRESS_PREPARE_DIR}/wp-content/database" && \
touch "${WORDPRESS_PREPARE_DIR}/wp-content/database/.ht.sqlite" && \
chmod 640 "${WORDPRESS_PREPARE_DIR}/wp-content/database/.ht.sqlite"