tntprojects commited on
Commit
2376c83
·
verified ·
1 Parent(s): dce6531

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -7
Dockerfile CHANGED
@@ -1,18 +1,28 @@
1
- # ... (todo lo anterior del Dockerfile igual hasta el paso 4)
2
 
3
- # 4. CREAR EL WP-CONFIG CON MODO DEBUG ACTIVADO
 
 
 
 
 
 
 
 
 
 
4
  RUN echo "<?php \
5
  define('DB_NAME', 'local_db'); \
6
  define('DB_USER', 'root'); \
7
  define('DB_PASSWORD', 'root'); \
8
  define('DB_HOST', 'localhost'); \
9
- define('DB_CHARSET', 'utf8'); \
10
- define('DB_COLLATE', ''); \
11
  \$table_prefix = 'wp_'; \
12
  define('WP_DEBUG', true); \
13
- define('WP_DEBUG_DISPLAY', true); \
14
- define('WP_DEBUG_LOG', true); \
15
  if ( ! defined( 'ABSOLUTE_PATH' ) ) { define( 'ABSOLUTE_PATH', __DIR__ . '/' ); } \
16
  require_once ABSOLUTE_PATH . 'wp-settings.php';" > /var/www/html/wp-config.php
17
 
18
- # ... (resto igual)
 
 
 
 
 
1
+ FROM wordpress:latest
2
 
3
+ RUN sed -i 's/Listen 80/Listen 7860/' /etc/apache2/ports.conf
4
+ RUN sed -i 's/:80/:7860/' /etc/apache2/sites-available/000-default.conf
5
+
6
+ RUN apt-get update && apt-get install -y sqlite3 libsqlite3-dev unzip \
7
+ && docker-php-ext-install pdo pdo_sqlite
8
+
9
+ ADD https://downloads.wordpress.org/plugin/sqlite-integration.1.8.1.zip /tmp/sqlite-integration.zip
10
+ RUN unzip /tmp/sqlite-integration.zip -d /var/www/html/wp-content/plugins/
11
+ RUN cp /var/www/html/wp-content/plugins/sqlite-integration/db.php /var/www/html/wp-content/db.php
12
+
13
+ # Crear el wp-config directamente
14
  RUN echo "<?php \
15
  define('DB_NAME', 'local_db'); \
16
  define('DB_USER', 'root'); \
17
  define('DB_PASSWORD', 'root'); \
18
  define('DB_HOST', 'localhost'); \
 
 
19
  \$table_prefix = 'wp_'; \
20
  define('WP_DEBUG', true); \
 
 
21
  if ( ! defined( 'ABSOLUTE_PATH' ) ) { define( 'ABSOLUTE_PATH', __DIR__ . '/' ); } \
22
  require_once ABSOLUTE_PATH . 'wp-settings.php';" > /var/www/html/wp-config.php
23
 
24
+ # PERMISOS AGRESIVOS: Necesarios para que SQLite cree el archivo .ht.sqlite
25
+ RUN chmod -R 777 /var/www/html/wp-content
26
+
27
+ EXPOSE 7860
28
+ CMD ["apache2-foreground"]