Update Dockerfile

This commit is contained in:
2026-01-01 14:15:53 +00:00
parent 63f72ac2c8
commit 24b70c204f

View File

@@ -48,27 +48,43 @@ RUN npm run publish
# Stage 3
# Build the CMS container
FROM ubuntu:24.04
MAINTAINER OTS Signs <contact@ots-signs.com>
LABEL maintainer="OTS Signs <contact@ots-signs.com>"
LABEL org.opencontainers.image.authors="contact@ots-signs.com"
# Install apache, PHP, and supplimentary programs.
RUN apt update && \
apt install -y software-properties-common lsb-release ca-certificates curl && \
rm -rf /var/lib/apt/lists/* && \
ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime
# Set noninteractive mode and timezone
ENV DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC LC_ALL=C.UTF-8
# Add sury.org PHP Repository
RUN curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg && \
sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
# Install base tools
RUN set -eux \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
software-properties-common \
lsb-release \
ca-certificates \
curl \
gnupg \
&& ln -fs /usr/share/zoneinfo/$TZ /etc/localtime \
&& rm -rf /var/lib/apt/lists/*
RUN LC_ALL=C.UTF-8 DEBIAN_FRONTEND=noninteractive apt update && apt upgrade -y && apt install -y \
# Add Sury PHP Repository
RUN set -eux \
&& curl -fsSL https://packages.sury.org/php/apt.gpg | gpg --dearmor -o /usr/share/keyrings/deb.sury.org-php.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" \
> /etc/apt/sources.list.d/php.list
# Install Apache, PHP 8.4, and required packages
RUN set -eux \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
tar \
bash \
curl \
apache2 \
libapache2-mod-xsendfile \
netcat \
netcat-traditional \
iputils-ping \
gnupg \
php8.4 \
@@ -80,16 +96,12 @@ RUN LC_ALL=C.UTF-8 DEBIAN_FRONTEND=noninteractive apt update && apt upgrade -y &
php8.4-mysql \
php8.4-gettext \
php8.4-soap \
php8.4-iconv \
php8.4-curl \
php8.4-ctype \
php8.4-fileinfo \
php8.4-xml \
php8.4-simplexml \
php8.4-mbstring \
php8.4-memcached \
php8.4-phar \
php8.4-opcache \
php8.4-intl \
php8.4-memcached \
php8.4-mongodb \
php8.4-gnupg \
tzdata \
@@ -97,8 +109,12 @@ RUN LC_ALL=C.UTF-8 DEBIAN_FRONTEND=noninteractive apt update && apt upgrade -y &
openssl \
cron \
default-mysql-client \
&& ln -fs /usr/share/zoneinfo/$TZ /etc/localtime \
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& rm -rf /var/lib/apt/lists/*
``
RUN update-alternatives --set php /usr/bin/php8.4