kingkay000 commited on
Commit
11d9fda
·
verified ·
1 Parent(s): 85c093f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -28
Dockerfile CHANGED
@@ -1,53 +1,46 @@
1
  FROM php:8.2-apache
2
 
3
- # 1) Add bullseye repo ONLY to fetch libc-client-dev (for IMAP)
4
- RUN echo "deb http://deb.debian.org/debian bullseye main" > /etc/apt/sources.list.d/bullseye.list
5
-
6
- # 2) Pin bullseye so it won't "downgrade" other packages (like freetype)
7
- RUN printf "Package: *\nPin: release n=bullseye\nPin-Priority: 100\n\nPackage: libc-client-dev\nPin: release n=bullseye\nPin-Priority: 990\n" \
8
- > /etc/apt/preferences.d/pin-bullseye
9
-
10
- # 3) Install dependencies
11
- # - GD deps from base distro (no version conflict)
12
- # - libc-client-dev explicitly from bullseye
13
  RUN apt-get update && apt-get install -y \
 
14
  libpng-dev \
15
  libjpeg62-turbo-dev \
16
  libfreetype6-dev \
17
  libwebp-dev \
 
 
 
 
 
18
  libonig-dev \
19
  libxml2-dev \
 
20
  zip \
21
  unzip \
22
- libkrb5-dev \
23
- libssl-dev \
24
- libldap2-dev \
25
- -t bullseye libc-client-dev \
26
- && rm -rf /var/lib/apt/lists/* \
27
- && rm -f /etc/apt/sources.list.d/bullseye.list \
28
- && rm -f /etc/apt/preferences.d/pin-bullseye
29
 
30
- # 4) Configure & install IMAP
31
  RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
32
- && docker-php-ext-install imap
33
 
34
- # 5) Install GD + MySQL extensions (remove duplicate mysqli line)
35
- RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
36
- && docker-php-ext-install -j$(nproc) gd pdo pdo_mysql mysqli \
37
  && docker-php-ext-enable mysqli
38
 
39
- # 6) Enable Apache Rewrite and set port
40
- RUN a2enmod rewrite
41
- RUN sed -i 's/80/7860/g' /etc/apache2/ports.conf /etc/apache2/sites-available/000-default.conf
42
 
43
- # 7) Setup files
44
  WORKDIR /var/www/html
45
  COPY . .
46
 
47
- # 8) Set permissions
48
  RUN chown -R www-data:www-data /var/www/html/bank-update || true
49
 
50
- # 9) Link the Apache config
51
  COPY apache-config.conf /etc/apache2/sites-available/000-default.conf
52
 
53
  CMD ["apache2-foreground"]
 
1
  FROM php:8.2-apache
2
 
3
+ # Install dependencies
 
 
 
 
 
 
 
 
 
4
  RUN apt-get update && apt-get install -y \
5
+ # GD deps
6
  libpng-dev \
7
  libjpeg62-turbo-dev \
8
  libfreetype6-dev \
9
  libwebp-dev \
10
+ # IMAP deps (modern)
11
+ libc-client2007e-dev \
12
+ libkrb5-dev \
13
+ libssl-dev \
14
+ # Other deps you had
15
  libonig-dev \
16
  libxml2-dev \
17
+ libldap2-dev \
18
  zip \
19
  unzip \
20
+ && rm -rf /var/lib/apt/lists/*
21
+
22
+ # Configure & install extensions
23
+ RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
24
+ && docker-php-ext-install -j$(nproc) gd
 
 
25
 
 
26
  RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
27
+ && docker-php-ext-install -j$(nproc) imap
28
 
29
+ RUN docker-php-ext-install -j$(nproc) pdo pdo_mysql mysqli \
 
 
30
  && docker-php-ext-enable mysqli
31
 
32
+ # Enable Apache Rewrite and set port
33
+ RUN a2enmod rewrite \
34
+ && sed -i 's/80/7860/g' /etc/apache2/ports.conf /etc/apache2/sites-available/000-default.conf
35
 
36
+ # Setup files
37
  WORKDIR /var/www/html
38
  COPY . .
39
 
40
+ # Set permissions
41
  RUN chown -R www-data:www-data /var/www/html/bank-update || true
42
 
43
+ # Link the Apache config
44
  COPY apache-config.conf /etc/apache2/sites-available/000-default.conf
45
 
46
  CMD ["apache2-foreground"]