HenzHosting commited on
Commit
7381ecb
·
verified ·
1 Parent(s): 764c54e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -3
Dockerfile CHANGED
@@ -5,14 +5,20 @@ FROM php:8.1-apache
5
  RUN apt-get update && apt-get install -y git && \
6
  docker-php-ext-install pdo pdo_mysql mysqli
7
 
 
 
 
 
 
 
8
  # Set the working directory
9
  WORKDIR /var/www/html
10
 
11
  # Clone your repository into the container (using the master branch)
12
- RUN git clone https://github.com/EMMYHENZ-TECH/Ff-hk.git .
13
 
14
- # Expose port 80 for Apache
15
- EXPOSE 80
16
 
17
  # Start Apache in the foreground
18
  CMD ["apache2-foreground"]
 
5
  RUN apt-get update && apt-get install -y git && \
6
  docker-php-ext-install pdo pdo_mysql mysqli
7
 
8
+ # Set Apache ServerName to avoid warning
9
+ RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
10
+
11
+ # Change Apache listening port to 8080
12
+ RUN sed -i 's/80/8080/g' /etc/apache2/ports.conf /etc/apache2/sites-available/000-default.conf
13
+
14
  # Set the working directory
15
  WORKDIR /var/www/html
16
 
17
  # Clone your repository into the container (using the master branch)
18
+ RUN git clone https://github.com/EMMYHENZ-TECH/Ff-hk.git .
19
 
20
+ # Expose port 8080 for Apache
21
+ EXPOSE 8080
22
 
23
  # Start Apache in the foreground
24
  CMD ["apache2-foreground"]