Forráskód Böngészése

create the run dir in start.sh

Girish Ramakrishnan 7 éve
szülő
commit
af9c13fdc9
2 módosított fájl, 3 hozzáadás és 2 törlés
  1. 1 2
      Dockerfile
  2. 2 0
      start.sh

+ 1 - 2
Dockerfile

@@ -13,8 +13,7 @@ RUN mv /app/code/wp-content /app/code/wp-content-vanilla && ln -s /app/data/wp-c
 RUN ln -s /app/data/htaccess /app/code/.htaccess
 ADD wp-config.php.template /app/code/wp-config.php.template
 
-RUN mkdir -p /run/wordpress/sessions && \
-    ln -sf /run/wordpress/wp-config.php /app/code/wp-config.php
+RUN ln -sf /run/wordpress/wp-config.php /app/code/wp-config.php
 
 RUN curl -L -o /app/code/wp https://github.com/wp-cli/wp-cli/releases/download/v1.4.1/wp-cli-1.4.1.phar
 RUN chmod +x /app/code/wp

+ 2 - 0
start.sh

@@ -3,6 +3,8 @@
 set -eu
 
 readonly WP="/app/code/wp --allow-root"
+ 
+mkdir -p /run/wordpress/sessions
 
 # Detect the wordpress prefix from existing database. This is a bit of a hack because some wordpress plugins
 # seem to leave the old wp_ tables behind.