so i have a docker file this is it :
FROM php:8.2.12-zts-alpine3.18
WORKDIR /var/www/html
RUN apk add --no-cache ca-certificates
# Install system dependencies
RUN apk update && apk add
postgresql-dev
libpng-dev
libjpeg-turbo-dev
freetype-dev
# Install PHP extensions
RUN docker-php-ext-install pdo_pgsql
&& docker-php-ext-configure gd --with-jpeg --with-freetype
&& docker-php-ext-install gd
&& docker-php-ext-install exif
# Run script to modify PHP settings
RUN set -eux;
sed -i -E
-e 's/max_execution_times*=.*/max_execution_time = 120000/'
-e 's/memory_limits*=.*/memory_limit = 512M/'
-e 's/post_max_sizes*=.*/post_max_size = 40M/'
-e 's/upload_max_filesizes*=.*/upload_max_filesize = 40M/'
/usr/local/etc/php/php.ini-development
/usr/local/etc/php/php.ini-production
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --version=2.5.2 --install-dir=/usr/local/bin --filename=composer
# Copy application files
COPY . .
# Install application dependencies
RUN composer install
RUN php artisan storage:link
# Expose port 8000
EXPOSE 8000
# Start the PHP server
CMD ["php","artisan","serve","--host=0.0.0.0"]
it was working just fine , and yesterday when i did the docker build command again it gave me this error :
=> ERROR [ 5/10] RUN docker-php-ext-install pdo_pgsql && docker-php-ext-configure gd --with-jpeg --with-freetype && docker-php-ext-install gd && docker-php-ext-install exif 7.8s
------
> [ 5/10] RUN docker-php-ext-install pdo_pgsql && docker-php-ext-configure gd --with-jpeg --with-freetype && docker-php-ext-install gd && docker-php-ext-install exif:
6.423 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
6.501 48FB3F54697F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1889:
6.503 WARNING: fetching https://dl-cdn.alpinelinux.org/alpine/v3.18/main: Permission denied
6.503 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
6.557 48FB3F54697F0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1889:
6.559 WARNING: fetching https://dl-cdn.alpinelinux.org/alpine/v3.18/community: Permission denied
6.560 ERROR: unable to select packages:
6.560 .phpize-deps-20240227.124833:
6.560 masked in: cache
6.560 satisfies: world[.phpize-deps=20240227.124833]
6.560 autoconf (no such package):
6.560 required by: .phpize-deps-20240227.124833[autoconf]
6.560 dpkg-dev (no such package):
6.560 required by: .phpize-deps-20240227.124833[dpkg-dev]
6.560 dpkg (no such package):
6.560 required by: .phpize-deps-20240227.124833[dpkg]
6.560 file (no such package):
6.560 required by: .phpize-deps-20240227.124833[file]
6.560 g++ (no such package):
6.560 required by: .phpize-deps-20240227.124833[g++]
6.560 libc-dev (no such package):
6.560 required by: .phpize-deps-20240227.124833[libc-dev]
6.560 make (no such package):
6.560 required by: .phpize-deps-20240227.124833[make]
6.560 re2c (no such package):
6.560 required by: .phpize-deps-20240227.124833[re2c]
------
WARNING: current commit information was not captured by the build: git was not found in the system: exec: "git": executable file not found in $PATH
Dockerfile:16
--------------------
15 | # Install PHP extensions
16 | >>> RUN docker-php-ext-install pdo_pgsql
17 | >>> && docker-php-ext-configure gd --with-jpeg --with-freetype
18 | >>> && docker-php-ext-install gd
19 | >>> && docker-php-ext-install exif
20 |
--------------------
ERROR: failed to solve: process "/bin/sh -c docker-php-ext-install pdo_pgsql && docker-php-ext-configure gd --with-jpeg --with-freetype && docker-php-ext-install gd && docker-php-ext-install exif" did not complete successfully: exit code: 9
i added this line to it :
RUN apk add --no-cache ca-certificates
to add certificates but still it doesn’t work
i found some solutions where i can bring the http repository or do an –allow untrusted and stuffs
but i don’t want to use something that is not secure
and i cannot find any solution for this
did they change something in the alpine repository certificates or what happened ,and how can i fix it
i already searched and used gpt and everything but i couldn’t find a solution guys