mirror of
https://github.com/jkaninda/nginx-php-fpm.git
synced 2025-12-06 13:39:42 +01:00
Add php 7.2,7.3
This commit is contained in:
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@@ -22,6 +22,20 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
-
|
||||||
|
name: Build and push 7.2
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
file: "./docker/7.2/Dockerfile"
|
||||||
|
push: true
|
||||||
|
tags: "${{env.BUILDKIT_IMAGE}}:7.2"
|
||||||
|
-
|
||||||
|
name: Build and push 7.3
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
file: "./docker/7.3/Dockerfile"
|
||||||
|
push: true
|
||||||
|
tags: "${{env.BUILDKIT_IMAGE}}:7.3"
|
||||||
-
|
-
|
||||||
name: Build and push 7.4
|
name: Build and push 7.4
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
|
|||||||
87
docker/7.2/Dockerfile
Normal file
87
docker/7.2/Dockerfile
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
FROM php:7.2-fpm
|
||||||
|
ARG WORKDIR=/var/www/html
|
||||||
|
ENV DOCUMENT_ROOT=${WORKDIR}
|
||||||
|
ENV LARAVEL_PROCS_NUMBER=1
|
||||||
|
ENV DOMAIN=_
|
||||||
|
ENV CLIENT_MAX_BODY_SIZE=15M
|
||||||
|
ENV NODE_VERSION=17.x
|
||||||
|
ARG HOST_UID=1000
|
||||||
|
ENV USER=www-data
|
||||||
|
# Install system dependencies
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
git \
|
||||||
|
curl \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libjpeg62-turbo-dev \
|
||||||
|
libmemcached-dev \
|
||||||
|
libzip-dev \
|
||||||
|
libpng-dev \
|
||||||
|
libonig-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
librdkafka-dev \
|
||||||
|
libpq-dev \
|
||||||
|
openssh-server \
|
||||||
|
zip \
|
||||||
|
unzip \
|
||||||
|
supervisor \
|
||||||
|
sqlite3 \
|
||||||
|
nano \
|
||||||
|
cron
|
||||||
|
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
|
||||||
|
# Install Node
|
||||||
|
RUN apt-get install -y nodejs
|
||||||
|
# Install nginx
|
||||||
|
RUN apt-get update && apt-get install -y nginx
|
||||||
|
|
||||||
|
# Clear cache
|
||||||
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install PHP extensions zip, mbstring, exif, bcmath, intl
|
||||||
|
RUN docker-php-ext-configure gd
|
||||||
|
RUN docker-php-ext-install zip mbstring exif pcntl bcmath -j$(nproc) gd intl
|
||||||
|
|
||||||
|
# Install Redis and enable it
|
||||||
|
RUN pecl install redis && docker-php-ext-enable redis
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Install the php memcached extension
|
||||||
|
RUN pecl install memcached && docker-php-ext-enable memcached
|
||||||
|
|
||||||
|
# Install the PHP pdo_mysql extention
|
||||||
|
RUN docker-php-ext-install pdo_mysql
|
||||||
|
|
||||||
|
# Install the PHP pdo_pgsql extention
|
||||||
|
RUN docker-php-ext-install pdo_pgsql
|
||||||
|
|
||||||
|
|
||||||
|
# Install Composer
|
||||||
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR $WORKDIR
|
||||||
|
|
||||||
|
RUN rm -Rf /var/www/* && \
|
||||||
|
mkdir -p /var/www/html
|
||||||
|
|
||||||
|
ADD src/index.php $WORKDIR/index.php
|
||||||
|
ADD src/conf/nginx/default.conf /etc/nginx/sites-available/default
|
||||||
|
ADD src/php.ini $PHP_INI_DIR/conf.d/
|
||||||
|
ADD src/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
COPY ./entrypoint.sh /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
RUN ln -s /usr/local/bin/entrypoint.sh /
|
||||||
|
|
||||||
|
ENTRYPOINT ["entrypoint.sh"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
RUN usermod -u ${HOST_UID} www-data
|
||||||
|
RUN groupmod -g ${HOST_UID} www-data
|
||||||
|
|
||||||
|
RUN chmod -R 755 $WORKDIR
|
||||||
|
RUN chown -R www-data:www-data $WORKDIR
|
||||||
|
EXPOSE 9000 80
|
||||||
|
CMD [ "entrypoint" ]
|
||||||
87
docker/7.3/Dockerfile
Normal file
87
docker/7.3/Dockerfile
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
FROM php:7.3-fpm
|
||||||
|
ARG WORKDIR=/var/www/html
|
||||||
|
ENV DOCUMENT_ROOT=${WORKDIR}
|
||||||
|
ENV LARAVEL_PROCS_NUMBER=1
|
||||||
|
ENV DOMAIN=_
|
||||||
|
ENV CLIENT_MAX_BODY_SIZE=15M
|
||||||
|
ENV NODE_VERSION=17.x
|
||||||
|
ARG HOST_UID=1000
|
||||||
|
ENV USER=www-data
|
||||||
|
# Install system dependencies
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
git \
|
||||||
|
curl \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libjpeg62-turbo-dev \
|
||||||
|
libmemcached-dev \
|
||||||
|
libzip-dev \
|
||||||
|
libpng-dev \
|
||||||
|
libonig-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
librdkafka-dev \
|
||||||
|
libpq-dev \
|
||||||
|
openssh-server \
|
||||||
|
zip \
|
||||||
|
unzip \
|
||||||
|
supervisor \
|
||||||
|
sqlite3 \
|
||||||
|
nano \
|
||||||
|
cron
|
||||||
|
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
|
||||||
|
# Install Node
|
||||||
|
RUN apt-get install -y nodejs
|
||||||
|
# Install nginx
|
||||||
|
RUN apt-get update && apt-get install -y nginx
|
||||||
|
|
||||||
|
# Clear cache
|
||||||
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install PHP extensions zip, mbstring, exif, bcmath, intl
|
||||||
|
RUN docker-php-ext-configure gd
|
||||||
|
RUN docker-php-ext-install zip mbstring exif pcntl bcmath -j$(nproc) gd intl
|
||||||
|
|
||||||
|
# Install Redis and enable it
|
||||||
|
RUN pecl install redis && docker-php-ext-enable redis
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Install the php memcached extension
|
||||||
|
RUN pecl install memcached && docker-php-ext-enable memcached
|
||||||
|
|
||||||
|
# Install the PHP pdo_mysql extention
|
||||||
|
RUN docker-php-ext-install pdo_mysql
|
||||||
|
|
||||||
|
# Install the PHP pdo_pgsql extention
|
||||||
|
RUN docker-php-ext-install pdo_pgsql
|
||||||
|
|
||||||
|
|
||||||
|
# Install Composer
|
||||||
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR $WORKDIR
|
||||||
|
|
||||||
|
RUN rm -Rf /var/www/* && \
|
||||||
|
mkdir -p /var/www/html
|
||||||
|
|
||||||
|
ADD src/index.php $WORKDIR/index.php
|
||||||
|
ADD src/conf/nginx/default.conf /etc/nginx/sites-available/default
|
||||||
|
ADD src/php.ini $PHP_INI_DIR/conf.d/
|
||||||
|
ADD src/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
COPY ./entrypoint.sh /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
RUN ln -s /usr/local/bin/entrypoint.sh /
|
||||||
|
|
||||||
|
ENTRYPOINT ["entrypoint.sh"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
RUN usermod -u ${HOST_UID} www-data
|
||||||
|
RUN groupmod -g ${HOST_UID} www-data
|
||||||
|
|
||||||
|
RUN chmod -R 755 $WORKDIR
|
||||||
|
RUN chown -R www-data:www-data $WORKDIR
|
||||||
|
EXPOSE 9000 80
|
||||||
|
CMD [ "entrypoint" ]
|
||||||
Reference in New Issue
Block a user