Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
* @aligent/aligent-devops
* @aligent/devops

composer.json @aligent-lturner
46 changes: 35 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
ARG PHP_VERSION
FROM php:${PHP_VERSION} as standards-runtime

RUN apt-get update
RUN apt-get install -y unzip libpng-dev libicu-dev libxslt-dev jq git libzip-dev wget python3-venv
RUN apt-get clean

FROM php:${PHP_VERSION}-alpine3.21 as standards-runtime

# Install system dependencies
RUN apk update && apk add --no-cache \
unzip \
libpng-dev \
icu-dev \
libxslt-dev \
jq \
git \
libzip-dev \
wget \
python3 \
py3-pip \
python3-dev \
# Additional dependencies for PHP extensions
freetype-dev \
libjpeg-turbo-dev \
libwebp-dev \
oniguruma-dev \
libxml2-dev \
# Build dependencies
autoconf \
g++ \
make \
linux-headers

# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN docker-php-ext-install gd bcmath zip intl xsl pdo_mysql soap sockets
# Configure and install PHP extensions
RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp && \
docker-php-ext-install gd bcmath zip intl xsl pdo_mysql soap sockets

RUN mkdir /composer
COPY composer.json /composer
Expand All @@ -18,14 +42,14 @@ RUN cd /composer && \
FROM standards-runtime

ENV PYTHONUNBUFFERED=1
RUN apt-get install -y python3-dev python3-pip
RUN apt-get clean

# Create Python virtual environment and install dependencies
COPY pipe /
RUN chmod a+x /pipe.py
COPY requirements.txt /
RUN python3 -m venv /venv
RUN /venv/bin/pip install --no-cache-dir -r /requirements.txt
RUN python3 -m venv /venv && \
/venv/bin/pip install --upgrade pip && \
/venv/bin/pip install --no-cache-dir -r /requirements.txt

# Allow git access to mounted build directories
RUN git config --global --add safe.directory /build
Expand Down