File tree Expand file tree Collapse file tree 2 files changed +36
-12
lines changed
Expand file tree Collapse file tree 2 files changed +36
-12
lines changed Original file line number Diff line number Diff line change 1- * @ aligent/aligent- devops
1+ * @ aligent/devops
22
33composer.json @ aligent-lturner
Original file line number Diff line number Diff line change 11ARG PHP_VERSION
2- FROM php:${PHP_VERSION} as standards-runtime
3-
4- RUN apt-get update
5- RUN apt-get install -y unzip libpng-dev libicu-dev libxslt-dev jq git libzip-dev wget python3-venv
6- RUN apt-get clean
7-
2+ FROM php:${PHP_VERSION}-alpine3.21 as standards-runtime
3+
4+ # Install system dependencies
5+ RUN apk update && apk add --no-cache \
6+ unzip \
7+ libpng-dev \
8+ icu-dev \
9+ libxslt-dev \
10+ jq \
11+ git \
12+ libzip-dev \
13+ wget \
14+ python3 \
15+ py3-pip \
16+ python3-dev \
17+ # Additional dependencies for PHP extensions
18+ freetype-dev \
19+ libjpeg-turbo-dev \
20+ libwebp-dev \
21+ oniguruma-dev \
22+ libxml2-dev \
23+ # Build dependencies
24+ autoconf \
25+ g++ \
26+ make \
27+ linux-headers
28+
29+ # Install composer
830RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
931
10- RUN docker-php-ext-install gd bcmath zip intl xsl pdo_mysql soap sockets
32+ # Configure and install PHP extensions
33+ RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp && \
34+ docker-php-ext-install gd bcmath zip intl xsl pdo_mysql soap sockets
1135
1236RUN mkdir /composer
1337COPY composer.json /composer
@@ -18,14 +42,14 @@ RUN cd /composer && \
1842FROM standards-runtime
1943
2044ENV PYTHONUNBUFFERED=1
21- RUN apt-get install -y python3-dev python3-pip
22- RUN apt-get clean
2345
46+ # Create Python virtual environment and install dependencies
2447COPY pipe /
2548RUN chmod a+x /pipe.py
2649COPY requirements.txt /
27- RUN python3 -m venv /venv
28- RUN /venv/bin/pip install --no-cache-dir -r /requirements.txt
50+ RUN python3 -m venv /venv && \
51+ /venv/bin/pip install --upgrade pip && \
52+ /venv/bin/pip install --no-cache-dir -r /requirements.txt
2953
3054# Allow git access to mounted build directories
3155RUN git config --global --add safe.directory /build
You can’t perform that action at this time.
0 commit comments