App-json-build / Dockerfile
HenzHosting's picture
Update Dockerfile
4762768 verified
raw
history blame contribute delete
766 Bytes
# Use the official PHP Apache image
FROM php:8.1-apache
# Install git and necessary PHP extensions
RUN apt-get update && apt-get install -y git && \
docker-php-ext-install pdo pdo_mysql mysqli
# Set Apache ServerName to avoid warning
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
# Change Apache listening port to 7860 in both ports.conf and the default site config
RUN sed -i 's/80/7860/g' /etc/apache2/ports.conf /etc/apache2/sites-available/000-default.conf
# Set the working directory
WORKDIR /var/www/html
# Clone your repository into the container (using the master branch)
RUN git clone https://github.com/EMMYHENZ-TECH/Ff-hk.git .
# Expose port 7860 for Apache
EXPOSE 7860
# Start Apache in the foreground
CMD ["apache2-foreground"]