kingkay000 commited on
Commit
d98e68a
·
verified ·
1 Parent(s): 2c09acc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -6
Dockerfile CHANGED
@@ -5,23 +5,26 @@ RUN apt-get update && apt-get install -y \
5
  libpng-dev libonig-dev libxml2-dev zip unzip \
6
  && docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd
7
 
8
- # 2. Enable Apache Rewrite module
 
 
 
9
  RUN a2enmod rewrite
10
 
11
- # 3. Set Port to 7860 (Hugging Face Requirement)
12
  RUN sed -i 's/80/7860/g' /etc/apache2/ports.conf /etc/apache2/sites-available/000-default.conf
13
 
14
- # 4. Set the working directory
15
  WORKDIR /var/www/html
16
 
17
- # 5. Copy everything from your repository
18
  COPY . .
19
 
20
- # 6. Set permissions for your PHP app folder
21
  # Use -f (force) so it doesn't crash if the folder is empty
22
  RUN chown -R www-data:www-data /var/www/html/bank-update || true
23
 
24
- # 7. Apply the simplified routing
25
  COPY apache-config.conf /etc/apache2/sites-available/000-default.conf
26
 
27
  CMD ["apache2-foreground"]
 
5
  libpng-dev libonig-dev libxml2-dev zip unzip \
6
  && docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd
7
 
8
+ # 2. INSTALL AND ENABLE MYSQLI (This fixes your error)
9
+ RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
10
+
11
+ # 3. Enable Apache Rewrite module
12
  RUN a2enmod rewrite
13
 
14
+ # 4. Set Port to 7860 (Hugging Face Requirement)
15
  RUN sed -i 's/80/7860/g' /etc/apache2/ports.conf /etc/apache2/sites-available/000-default.conf
16
 
17
+ # 5. Set the working directory
18
  WORKDIR /var/www/html
19
 
20
+ # 6. Copy everything from your repository
21
  COPY . .
22
 
23
+ # 7. Set permissions for your PHP app folder
24
  # Use -f (force) so it doesn't crash if the folder is empty
25
  RUN chown -R www-data:www-data /var/www/html/bank-update || true
26
 
27
+ # 8. Apply the simplified routing
28
  COPY apache-config.conf /etc/apache2/sites-available/000-default.conf
29
 
30
  CMD ["apache2-foreground"]