Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -26
Dockerfile
CHANGED
|
@@ -4,33 +4,10 @@ FROM wordpress:latest
|
|
| 4 |
RUN sed -i 's/Listen 80/Listen 7860/' /etc/apache2/ports.conf
|
| 5 |
RUN sed -i 's/:80/:7860/' /etc/apache2/sites-available/000-default.conf
|
| 6 |
|
| 7 |
-
# 2.
|
| 8 |
-
|
| 9 |
-
&& docker-php-ext-install pdo pdo_sqlite
|
| 10 |
|
| 11 |
-
# 3.
|
| 12 |
-
ADD https://downloads.wordpress.org/plugin/sqlite-integration.1.8.1.zip /tmp/sqlite-integration.zip
|
| 13 |
-
RUN unzip /tmp/sqlite-integration.zip -d /var/www/html/wp-content/plugins/
|
| 14 |
-
RUN cp /var/www/html/wp-content/plugins/sqlite-integration/db.php /var/www/html/wp-content/db.php
|
| 15 |
-
|
| 16 |
-
# 4. --- EL PARCHE BRUTAL ---
|
| 17 |
-
# Este comando repara el error de la l铆nea 788 y otros similares
|
| 18 |
-
# cambiando las llaves { } por corchetes [ ] en el archivo problem谩tico.
|
| 19 |
-
RUN sed -i 's/{\([0-9a-zA-Z_]*\)}/[\1]/g' /var/www/html/wp-content/plugins/sqlite-integration/pdoengine.class.php
|
| 20 |
-
|
| 21 |
-
# 5. Crear el wp-config autom谩ticamente
|
| 22 |
-
RUN echo "<?php \
|
| 23 |
-
define('DB_NAME', 'local_db'); \
|
| 24 |
-
define('DB_USER', 'root'); \
|
| 25 |
-
define('DB_PASSWORD', 'root'); \
|
| 26 |
-
define('DB_HOST', 'localhost'); \
|
| 27 |
-
\$table_prefix = 'wp_'; \
|
| 28 |
-
define('WP_DEBUG', false); \
|
| 29 |
-
if ( ! defined( 'ABSOLUTE_PATH' ) ) { define( 'ABSOLUTE_PATH', __DIR__ . '/' ); } \
|
| 30 |
-
require_once ABSOLUTE_PATH . 'wp-settings.php';" > /var/www/html/wp-config.php
|
| 31 |
-
|
| 32 |
-
# 6. Permisos totales para que SQLite pueda escribir su base de datos
|
| 33 |
-
RUN chmod -R 777 /var/www/html/wp-content
|
| 34 |
RUN chown -R www-data:www-data /var/www/html/
|
| 35 |
|
| 36 |
EXPOSE 7860
|
|
|
|
| 4 |
RUN sed -i 's/Listen 80/Listen 7860/' /etc/apache2/ports.conf
|
| 5 |
RUN sed -i 's/:80/:7860/' /etc/apache2/sites-available/000-default.conf
|
| 6 |
|
| 7 |
+
# 2. Copiamos tu configuraci贸n de base de datos
|
| 8 |
+
COPY wp-config.php /var/www/html/wp-config.php
|
|
|
|
| 9 |
|
| 10 |
+
# 3. Permisos b谩sicos
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
RUN chown -R www-data:www-data /var/www/html/
|
| 12 |
|
| 13 |
EXPOSE 7860
|