Skip to content

Commit 84cfcb9

Browse files
committed
Added php-fpm base build
1 parent da93a23 commit 84cfcb9

File tree

1 file changed

+46
-1
lines changed

1 file changed

+46
-1
lines changed

docker/Dockerfile

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,48 @@
1+
# Create a PHP-FPM base container with pre-requisites for osTicket
2+
FROM php:8.4-fpm-alpine AS base
3+
4+
RUN set -x && \
5+
# Install runtime dependencies
6+
apk add --no-cache \
7+
wget \
8+
msmtp \
9+
ca-certificates \
10+
libpng \
11+
c-client \
12+
libintl \
13+
libxml2 \
14+
icu \
15+
openssl && \
16+
# Install build dependencies
17+
apk add --no-cache --virtual .build-deps \
18+
linux-headers \
19+
imap-dev \
20+
libpng-dev \
21+
oniguruma-dev \
22+
curl-dev \
23+
openldap-dev \
24+
gettext-dev \
25+
libxml2-dev \
26+
icu-dev \
27+
autoconf \
28+
g++ \
29+
make \
30+
pcre-dev && \
31+
# Install and configure PHP extensions
32+
docker-php-ext-configure gd && \
33+
docker-php-ext-install -j$(nproc) \
34+
gd \
35+
curl \
36+
mysqli \
37+
sockets \
38+
gettext \
39+
mbstring \
40+
xml \
41+
intl \
42+
opcache && \
43+
# Cleanup
44+
apk del .build-deps && \
45+
rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
146

247
# Stage 1: Deploy osTicket files
348
FROM php:8.4-cli AS deployer
@@ -122,7 +167,7 @@ CMD ["/usr/local/bin/start.sh"]
122167

123168
# Stage 3: Create Nginx container (for local development)
124169
FROM nginx:alpine AS nginx
125-
LABEL maintainer="Rob Coward <rob@uptimelabs.io>"
170+
LABEL maintainer="Rob Coward <rob.coward@devops-consultants.co.uk>"
126171

127172
# Copy nginx config
128173
# COPY docker/files/etc/nginx/nginx.conf /etc/nginx/nginx.conf

0 commit comments

Comments
 (0)