Skip to content

Commit c2d07cf

Browse files
committed
PHP new version
It will be used for Promoter since 8.1 is no longer security supported and 8.3 will end support in a year. 8.4 will end in almost 3 years. 8.5 is too early to use
1 parent 2665fb4 commit c2d07cf

2 files changed

Lines changed: 89 additions & 0 deletions

File tree

versions/8.4.15-fpm/Dockerfile

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
FROM surnet/alpine-wkhtmltopdf:3.19.0-0.12.6-full as wkhtmltopdf
2+
3+
FROM php:8.4.15-fpm-alpine
4+
5+
ENV S6_LOGGING=1 S6_OVERLAY_VERSION=1.19.1.1 GODNSMASQ_VERSION=1.0.7 CONSUL_TEMPLATE_VERSION=0.32.0 CONSUL_VERSION=1.15.0 MEMCACHED_DEPS="zlib-dev libmemcached-dev cyrus-sasl-dev" TZ="America/New_York"
6+
7+
# Download architecture-specific binaries (newer versions with ARM64 support)
8+
RUN apk add --no-cache unzip && \
9+
ARCH=$(uname -m) && \
10+
if [ "$ARCH" = "x86_64" ]; then CONSUL_ARCH="amd64"; \
11+
elif [ "$ARCH" = "aarch64" ]; then CONSUL_ARCH="arm64"; \
12+
else CONSUL_ARCH="amd64"; fi && \
13+
# Download consul
14+
wget -O /tmp/consul.zip https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_${CONSUL_ARCH}.zip && \
15+
unzip /tmp/consul.zip -d /usr/local/bin && \
16+
rm /tmp/consul.zip && \
17+
# Download consul-template
18+
wget -O /tmp/consul-template.zip https://releases.hashicorp.com/consul-template/${CONSUL_TEMPLATE_VERSION}/consul-template_${CONSUL_TEMPLATE_VERSION}_linux_${CONSUL_ARCH}.zip && \
19+
unzip /tmp/consul-template.zip -d /usr/local/bin && \
20+
rm /tmp/consul-template.zip && \
21+
chmod +x /usr/local/bin/consul /usr/local/bin/consul-template && \
22+
apk del unzip
23+
24+
# Copy s6 overlay configs (these are just scripts, not binaries)
25+
RUN mkdir -p /etc/cont-init.d /etc/services.d /root
26+
27+
RUN apk update && apk upgrade \
28+
&& apk add --no-cache \
29+
coreutils \
30+
freetype-dev \
31+
libjpeg-turbo-dev \
32+
libtool \
33+
libpng-dev \
34+
curl wget bash tree jq bind-tools build-base gcc autoconf \
35+
zlib \
36+
libmemcached-dev \
37+
cyrus-sasl-dev \
38+
zlib-dev \
39+
linux-headers \
40+
$PHPIZE_DEPS \
41+
&& pecl install memcached-3.3.0 \
42+
&& docker-php-ext-enable memcached \
43+
&& pecl install memcache \
44+
&& docker-php-ext-enable memcache \
45+
&& docker-php-ext-install mysqli \
46+
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
47+
&& docker-php-ext-install -j$(nproc) gd \
48+
&& docker-php-ext-install bcmath \
49+
&& rm -rf /tmp/pear
50+
51+
RUN ARCH=$(uname -m) && \
52+
if [ "$ARCH" = "x86_64" ]; then S6_ARCH="amd64"; \
53+
elif [ "$ARCH" = "aarch64" ]; then S6_ARCH="aarch64"; \
54+
else S6_ARCH="amd64"; fi && \
55+
curl -Ls https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.gz | tar -xz -C /
56+
57+
# Install Composer - disable xdebug during build
58+
RUN XDEBUG_MODE=off curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
59+
60+
RUN echo $TZ > /etc/timezone \
61+
&& touch /usr/local/var/run/php-fpm.pid \
62+
&& echo -ne "- with $(php -v | head -n 1)\n" >> /root/.built
63+
64+
EXPOSE 9000
65+
66+
# Workaround https://bugs.php.net/bug.php?id=71880
67+
ENV LOG_STREAM="/tmp/stdout"
68+
RUN mkfifo $LOG_STREAM && chmod 777 $LOG_STREAM
69+
70+
ENTRYPOINT ["/init"]
71+
CMD ["/bin/sh", "-c", "/usr/local/sbin/php-fpm --pid /usr/local/var/run/php-fpm.pid | tail -f $LOG_STREAM"]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM bandsintown/php:8.4.15-fpm
2+
3+
ENV BATS_VERSION=0.4.0 DOCKERIZE_VERSION=v0.2.0
4+
5+
COPY tests /tests
6+
WORKDIR /tests
7+
8+
RUN exec 2>&1 && apk add --update bind-tools bc jq \
9+
&& curl -Ls https://codeload.github.com/sstephenson/bats/zip/v$BATS_VERSION -o /tmp/bats.zip \
10+
&& cd /tmp \
11+
&& unzip -q bats.zip \
12+
&& ./bats-${BATS_VERSION}/install.sh /usr/local \
13+
&& ln -sf /usr/local/libexec/bats /usr/local/bin/bats \
14+
&& wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
15+
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
16+
&& rm -f bats.zip dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
17+
18+
CMD ["bash"]

0 commit comments

Comments
 (0)