Initial commit: Dockerize Cazubu
All checks were successful
Docker Build & Push / build-and-push (push) Successful in 1m36s
All checks were successful
Docker Build & Push / build-and-push (push) Successful in 1m36s
This commit is contained in:
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
FROM php:8.2-apache
|
||||
|
||||
# Install system dependencies and PHP extensions
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libpng-dev \
|
||||
libjpeg-dev \
|
||||
libfreetype6-dev \
|
||||
zip \
|
||||
unzip \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) gd mysqli pdo pdo_mysql \
|
||||
&& a2enmod rewrite
|
||||
|
||||
# Clean up apt cache
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Copy application source
|
||||
COPY . /var/www/html/
|
||||
|
||||
# Set permissions for the web server
|
||||
RUN chown -R www-data:www-data /var/www/html \
|
||||
&& chmod -R 755 /var/www/html
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
Reference in New Issue
Block a user