Now stuff is installed in the container instead of the image

This commit is contained in:
eroncero
2025-08-05 15:41:26 +02:00
parent 8df5735249
commit 0e9c43d34d
12 changed files with 55 additions and 37 deletions

View File

@@ -1,21 +1,20 @@
FROM debian:bookworm
ARG DEBIAN_FRONTEND=noninteractive
ARG DEBCONF_NONINTERACTIVE_SEEN=true
RUN apt-get update; apt-get full-upgrade -y; apt-get autoclean -y && apt install iputils-ping -y
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN=true
RUN apt-get update; apt-get full-upgrade -y; apt-get autoclean -y && apt-get install iputils-ping -y
COPY project/buildtime/sury-repo.sh /tmp/buildtime/sury-repo.sh
RUN /bin/sh /tmp/buildtime/sury-repo.sh
ARG BUILDTIME_PHP_VER_INST="8.2"
ENV BUILDTIME_PHP_VER_INST="8.2"
COPY project/buildtime/buildtime_php_ver_inst.sh /tmp/buildtime/buildtime_php_ver_inst.sh
COPY project/buildtime/preserve-files.sh /tmp/buildtime/preserve-files.sh
RUN /bin/sh /tmp/buildtime/buildtime_php_ver_inst.sh
ENV DEF_PHP_INTERPRETER="8.2"
ENV PHP_VERSIONS=
COPY project/entrypoint/entrypoint.sh /entrypoint/entrypoint.sh
COPY project/entrypoint/container-php-ver-inst.sh /entrypoint/container-php-ver-inst.sh
COPY project/entrypoint/install-php-versions.sh /entrypoint/install-php-versions.sh
COPY project/entrypoint/start-php-fpm.sh /entrypoint/start-php-fpm.sh
RUN /bin/sh /tmp/buildtime/preserve-files.sh
ENTRYPOINT ["/bin/sh", "/entrypoint/entrypoint.sh"]

View File

@@ -4,7 +4,7 @@ apt-get update
BUILDTIME_PHP_VER_INST="8.2"
apt-get install -y \
apt-get install -y --download-only \
php$BUILDTIME_PHP_VER_INST-fpm \
php$BUILDTIME_PHP_VER_INST-bcmath \
php$BUILDTIME_PHP_VER_INST-bz2 \

View File

@@ -1,4 +0,0 @@
#!/bin/sh
mkdir -p /tmp/buildtime/etc/php
mv /etc/php/* /tmp/buildtime/etc/php/

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# To add this repository please do:
apt-get -y install lsb-release ca-certificates curl
apt-get install lsb-release ca-certificates curl -y
curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
dpkg -i /tmp/debsuryorg-archive-keyring.deb
sh -c 'echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'

View File

@@ -0,0 +1,40 @@
#!/bin/sh
apt-get update
apt-get install -y \
php$BUILDTIME_PHP_VER_INST-fpm \
php$BUILDTIME_PHP_VER_INST-bcmath \
php$BUILDTIME_PHP_VER_INST-bz2 \
php$BUILDTIME_PHP_VER_INST-common \
php$BUILDTIME_PHP_VER_INST-curl \
php$BUILDTIME_PHP_VER_INST-dba \
php$BUILDTIME_PHP_VER_INST-enchant \
php$BUILDTIME_PHP_VER_INST-gd \
php$BUILDTIME_PHP_VER_INST-gmp \
php$BUILDTIME_PHP_VER_INST-http \
php$BUILDTIME_PHP_VER_INST-imap \
php$BUILDTIME_PHP_VER_INST-interbase \
php$BUILDTIME_PHP_VER_INST-intl \
php$BUILDTIME_PHP_VER_INST-ldap \
php$BUILDTIME_PHP_VER_INST-mbstring \
php$BUILDTIME_PHP_VER_INST-memcache \
php$BUILDTIME_PHP_VER_INST-memcached \
php$BUILDTIME_PHP_VER_INST-mysql \
php$BUILDTIME_PHP_VER_INST-odbc \
php$BUILDTIME_PHP_VER_INST-opcache \
php$BUILDTIME_PHP_VER_INST-pgsql \
php$BUILDTIME_PHP_VER_INST-ps \
php$BUILDTIME_PHP_VER_INST-pspell \
php$BUILDTIME_PHP_VER_INST-raphf \
php$BUILDTIME_PHP_VER_INST-readline \
php$BUILDTIME_PHP_VER_INST-snmp \
php$BUILDTIME_PHP_VER_INST-soap \
php$BUILDTIME_PHP_VER_INST-sqlite3 \
php$BUILDTIME_PHP_VER_INST-stomp \
php$BUILDTIME_PHP_VER_INST-sybase \
php$BUILDTIME_PHP_VER_INST-tidy \
php$BUILDTIME_PHP_VER_INST-xdebug \
php$BUILDTIME_PHP_VER_INST-xml \
php$BUILDTIME_PHP_VER_INST-xsl \
php$BUILDTIME_PHP_VER_INST-zip \

View File

@@ -1,9 +1,10 @@
#!/bin/sh
/bin/sh /entrypoint/container-php-ver-inst.sh
/bin/sh /entrypoint/install-php-versions.sh
# Run the CMD that was passed (or default)
#exec "$@"
exec "$@"
tail -f /dev/null

View File

@@ -1,7 +1,5 @@
#!/bin/sh
mkdir -p /etc/php # Creates /etc/php if it doesn't exist
mv /tmp/buildtime/etc/php/* /etc/php/
# Start each version listed in PHP_VERSIONS
for version in $PHP_VERSIONS; do