Skip to content

Commit 4252331

Browse files
Merge pull request #46 from aligent/fix/lock-image-version
fix: lock image version
2 parents 467e737 + d5ab5ef commit 4252331

File tree

2 files changed

+36
-12
lines changed

2 files changed

+36
-12
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
* @aligent/aligent-devops
1+
* @aligent/devops
22

33
composer.json @aligent-lturner

Dockerfile

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,37 @@
11
ARG 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
830
RUN 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

1236
RUN mkdir /composer
1337
COPY composer.json /composer
@@ -18,14 +42,14 @@ RUN cd /composer && \
1842
FROM standards-runtime
1943

2044
ENV 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
2447
COPY pipe /
2548
RUN chmod a+x /pipe.py
2649
COPY 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
3155
RUN git config --global --add safe.directory /build

0 commit comments

Comments
 (0)