This commit is contained in:
root
2024-08-10 21:04:12 -05:00
parent 5e64a11c79
commit 2c96e994dc
14 changed files with 588 additions and 156 deletions
+23
View File
@@ -0,0 +1,23 @@
FROM php:5.4-fpm
COPY ./sources.list /etc/apt/sources.list
RUN apt-get update && \
apt-get install -y --no-install-recommends \
net-tools \
wget \
curl \
libssl-dev \
libnss3 \
nano \
procps \
nodejs \
gcc \
g++ \
make \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev && \
docker-php-ext-configure gd && \
docker-php-ext-install gd bz2 zip redis pdo_mysql mysqli mcrypt && \
rm -rf /var/lib/apt/lists/*
WORKDIR /srv
+23
View File
@@ -0,0 +1,23 @@
services:
php54:
hostname: php54
container_name: php54
image: php54
restart: always
privileged: true
volumes:
- /srv:/srv:rw
- ../../apps_data/php54/:/usr/local/etc:rw
dns:
- "1.1.1.1"
- "1.1.0.0"
ulimits:
nproc: 65535
cap_add:
- "ALL"
networks:
web:
ipv4_address: 172.28.32.73
networks:
web:
external: true
+2
View File
@@ -0,0 +1,2 @@
deb [trusted=yes] http://archive.debian.org/debian jessie main contrib non-free
deb [trusted=yes] http://archive.debian.org/debian-security jessie/updates main contrib non-free
+23
View File
@@ -0,0 +1,23 @@
services:
php73:
hostname: php73
container_name: php73
image: php:7.3.33-fpm-bullseye
restart: always
privileged: true
volumes:
- /srv:/srv:rw
- /apps_data/php73/config/etc:/apps_data/php73/config/etc:rw
dns:
- "1.1.1.1"
- "1.1.0.0"
ulimits:
nproc: 65535
cap_add:
- "ALL"
networks:
web:
ipv4_address: 172.28.32.73
networks:
web:
external: true
+43
View File
@@ -0,0 +1,43 @@
# Use the official PHP 8.2.16-fpm-bullseye base image
FROM php:8.2.16-fpm-bullseye
# Update package lists and install necessary packages
RUN apt-get update && \
apt-get install -y --no-install-recommends \
net-tools \
wget \
curl \
libssl-dev \
libnss3 \
nano \
procps \
nodejs \
gcc \
g++ \
make \
yarn && \
rm -rf /var/lib/apt/lists/*
# Install Composer
RUN curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php && \
HASH=`curl -sS https://composer.github.io/installer.sig` && \
php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('/tmp/composer-setup.php'); } echo PHP_EOL;" && \
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
rm -rf /tmp/composer-setup.php
# Add nodesource repository for Node.js
RUN curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh && \
bash nodesource_setup.sh && \
rm nodesource_setup.sh
# Add Yarn repository and key
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnkey.gpg >/dev/null && \
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list
# Install PHP extensions using mlocati's script
RUN curl -sSLf -o /usr/local/bin/install-php-extensions https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && \
chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions gd bz2 zip redis pdo_mysql mysqli mcrypt
WORKDIR /srv
USER root
+5
View File
@@ -0,0 +1,5 @@
#
```
docker build -t php82 .
docker compose -f run.yaml up -d
```
+26
View File
@@ -0,0 +1,26 @@
services:
php82:
hostname: php82
container_name: php82
# image: php:8.2.16-fpm-bullseye
image: php82
restart: always
privileged: true
volumes:
- /www:/www:rw
- /apps_data/php82/config/etc:/usr/local/etc:rw
# - /var/run/docker.sock:/var/run/docker.sock:rw
dns:
- "1.1.1.1"
- "1.1.0.0"
ulimits:
nproc: 65535
cap_add:
- "ALL"
command: php-fpm -y /usr/local/etc/php-fpm.conf -F -R
networks:
web:
ipv4_address: 172.28.32.82
networks:
web:
external: true