Merge pull request #40 from jkaninda/develop

Add php 7.2,7.3
This commit is contained in:
2023-01-08 12:30:36 +02:00
committed by GitHub
2 changed files with 105 additions and 0 deletions

View File

@@ -22,6 +22,20 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
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
uses: docker/build-push-action@v3

91
docker/7.3/Dockerfile Normal file
View File

@@ -0,0 +1,91 @@
FROM php:7.3-fpm
ARG WORKDIR=/var/www/html
ENV DOCUMENT_ROOT=${WORKDIR}
ENV LARAVEL_PROCS_NUMBER=1
ENV NODE_VERSION=16.x
# 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
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Install Kafka
RUN git clone https://github.com/arnaud-lb/php-rdkafka.git\
&& cd php-rdkafka \
&& phpize \
&& ./configure \
&& make all -j 5 \
&& make install
# Install Rdkafka and enable it
RUN docker-php-ext-enable rdkafka \
&& cd .. \
&& rm -rf /php-rdkafka
# 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/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 1000 www-data
RUN groupmod -g 1000 www-data
RUN chmod -R 755 $WORKDIR
RUN chown -R www-data:www-data $WORKDIR
EXPOSE 9000
CMD [ "entrypoint" ]