-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·36 lines (28 loc) · 1.02 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Base image olarak PHP 8.3 ve Apache kullanan resmi PHP imajını kullanıyoruz
FROM php:8.3-apache
LABEL authors="ahmetcelik"
LABEL description="PHP 8.3 ve Apache tabanlı bir Docker imajı"
# Apache ve PHP uzantılarını yüklemek için gerekli olan paketleri güncelliyoruz
RUN apt-get update && apt-get install -y \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libonig-dev \
libzip-dev \
zip \
unzip \
libpq-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install gd mbstring pdo pdo_pgsql pgsql zip
# Composer (PHP bağımlılık yöneticisi) kurulum
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Apache mod_rewrite modülünü etkinleştiriyoruz
RUN a2enmod rewrite
# Uygulama dosyalarını kopyalıyoruz
COPY . /var/www/html
# Çalışma dizinini belirliyoruz
WORKDIR /var/www/html
# Gerekli dosya izinlerini ayarlıyoruz
RUN chown -R www-data:www-data /var/www/html
# Apache'yi çalıştırıyoruz
CMD ["apache2-foreground"]