@@ -82,8 +82,15 @@ RUN ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a && \
8282 make install && \
8383 cp php.ini-production ${PHP_DIR}/lib/php.ini
8484
85+ RUN apt-get update && apt-get install -y \
86+ gcc-10 \
87+ g++-10 \
88+ && rm -rf /var/lib/apt/lists/*
89+
8590# Install gRPC
86- RUN pecl install grpc && \
91+ # 2. Export CC and CXX to use GCC 10 during PECL compilation
92+ RUN export CC=gcc-10 && export CXX=g++-10 && \
93+ pecl install grpc && \
8794 echo 'extension=grpc.so' >> ${PHP_DIR}/lib/conf.d/ext-grpc.ini
8895
8996# Install composer
@@ -101,18 +108,21 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" &&
101108RUN wget -O /usr/local/bin/phpdoc "https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.5.3/phpDocumentor.phar" \
102109 && chmod +x /usr/local/bin/phpdoc
103110
104- # Install Python3
105- RUN wget https://www.python.org/ftp/python/3.9.14/Python-3.9.14.tgz \
106- && tar -xvf Python-3.9.14.tgz \
107- && ./Python-3.9.14/configure --enable-optimizations \
108- && make altinstall
111+ # Install Python3 (Optimized Source Build for Docker)
112+ RUN wget https://www.python.org/ftp/python/3.11.15/Python-3.11.15.tgz \
113+ && tar -xvf Python-3.11.15.tgz \
114+ && cd Python-3.11.15 \
115+ && ./configure \
116+ && make altinstall \
117+ && cd .. \
118+ && rm -rf Python-3.11.15 Python-3.11.15.tgz
109119
110120# Install pip
111121RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
112- && python3.9 /tmp/get-pip.py \
122+ && python3.11 /tmp/get-pip.py \
113123 && rm /tmp/get-pip.py \
114- && python3.9 -m pip
124+ && python3.11 -m pip
115125
116126# Install docsuploader
117127COPY requirements.txt .
118- RUN python3.9 -m pip install --require-hashes -r requirements.txt
128+ RUN python3.11 -m pip install --require-hashes -r requirements.txt
0 commit comments