diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 616874c..0e77ffb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,7 @@ jobs: - php-80 - php-81 - php-82 + - php-83 - node-6 - node-8 - node-10 diff --git a/build.sh b/build.sh index 804cb6e..947263a 100755 --- a/build.sh +++ b/build.sh @@ -9,6 +9,8 @@ IMAGES=( # 'php-72' # 'php-73' # 'php-74' + # 'php-83' + # 'php-82' # 'php-81' # 'php-80' # 'node-6' diff --git a/php-71/DockerFile b/php-71/DockerFile index c60194c..81d92f2 100644 --- a/php-71/DockerFile +++ b/php-71/DockerFile @@ -20,7 +20,20 @@ COPY /resources/scripts/php/install_* /docker-scripts/ # Run Installation Scripts RUN /docker-scripts/install_dependencies.sh sudo vim nano netcat git iputils-ping dnsutils default-mysql-client -RUN /docker-scripts/install_extensions.sh +RUN install-php-extensions mysqli \ + pdo_mysql \ + mbstring \ + exif \ + pcntl \ + soap \ + gd \ + zip \ + sockets \ + opcache \ + intl \ + redis \ + imagick \ + yaml RUN /docker-scripts/install_users.sh RUN /docker-scripts/install_config.sh RUN /docker-scripts/install_nvm.sh diff --git a/php-72/DockerFile b/php-72/DockerFile index ada368b..e02563f 100644 --- a/php-72/DockerFile +++ b/php-72/DockerFile @@ -20,7 +20,20 @@ COPY /resources/scripts/php/install_* /docker-scripts/ # Run Installation Scripts RUN /docker-scripts/install_dependencies.sh sudo vim nano netcat git iputils-ping dnsutils default-mysql-client -RUN /docker-scripts/install_extensions.sh +RUN install-php-extensions mysqli \ + pdo_mysql \ + mbstring \ + exif \ + pcntl \ + soap \ + gd \ + zip \ + sockets \ + opcache \ + intl \ + redis \ + imagick \ + yaml RUN /docker-scripts/install_users.sh RUN /docker-scripts/install_config.sh RUN /docker-scripts/install_nvm.sh diff --git a/php-73/DockerFile b/php-73/DockerFile index 8c56c58..64b8079 100644 --- a/php-73/DockerFile +++ b/php-73/DockerFile @@ -20,7 +20,20 @@ COPY /resources/scripts/php/install_* /docker-scripts/ # Run Installation Scripts RUN /docker-scripts/install_dependencies.sh sudo vim nano netcat git iputils-ping dnsutils default-mysql-client -RUN /docker-scripts/install_extensions.sh +RUN install-php-extensions mysqli \ + pdo_mysql \ + mbstring \ + exif \ + pcntl \ + soap \ + gd \ + zip \ + sockets \ + opcache \ + intl \ + redis \ + imagick \ + yaml RUN /docker-scripts/install_users.sh RUN /docker-scripts/install_config.sh RUN /docker-scripts/install_nvm.sh diff --git a/php-74/DockerFile b/php-74/DockerFile index 37a1aaa..31afaf5 100644 --- a/php-74/DockerFile +++ b/php-74/DockerFile @@ -20,7 +20,20 @@ COPY /resources/scripts/php/install_* /docker-scripts/ # Run Installation Scripts RUN /docker-scripts/install_dependencies.sh sudo vim nano netcat git iputils-ping dnsutils default-mysql-client -RUN /docker-scripts/install_extensions.sh +RUN install-php-extensions mysqli \ + pdo_mysql \ + mbstring \ + exif \ + pcntl \ + soap \ + gd \ + zip \ + sockets \ + opcache \ + intl \ + redis \ + imagick \ + yaml RUN /docker-scripts/install_users.sh RUN /docker-scripts/install_config.sh RUN /docker-scripts/install_nvm.sh diff --git a/php-80/DockerFile b/php-80/DockerFile index 39b3c3f..2a9df3f 100644 --- a/php-80/DockerFile +++ b/php-80/DockerFile @@ -20,7 +20,20 @@ COPY /resources/scripts/php/install_* /docker-scripts/ # Run Installation Scripts RUN /docker-scripts/install_dependencies.sh sudo vim nano netcat git iputils-ping dnsutils default-mysql-client -RUN /docker-scripts/install_extensions.sh +RUN install-php-extensions mysqli \ + pdo_mysql \ + mbstring \ + exif \ + pcntl \ + soap \ + gd \ + zip \ + sockets \ + opcache \ + intl \ + redis \ + imagick \ + yaml RUN /docker-scripts/install_users.sh RUN /docker-scripts/install_config.sh RUN /docker-scripts/install_nvm.sh diff --git a/php-81/DockerFile b/php-81/DockerFile index a2665bb..2af9150 100644 --- a/php-81/DockerFile +++ b/php-81/DockerFile @@ -20,7 +20,20 @@ COPY /resources/scripts/php/install_* /docker-scripts/ # Run Installation Scripts RUN /docker-scripts/install_dependencies.sh sudo vim nano netcat-traditional git iputils-ping dnsutils default-mysql-client -RUN /docker-scripts/install_extensions.sh +RUN install-php-extensions mysqli \ + pdo_mysql \ + mbstring \ + exif \ + pcntl \ + soap \ + gd \ + zip \ + sockets \ + opcache \ + intl \ + redis \ + imagick \ + yaml RUN /docker-scripts/install_users.sh RUN /docker-scripts/install_config.sh RUN /docker-scripts/install_nvm.sh diff --git a/php-82/DockerFile b/php-82/DockerFile index 2bb0ae7..96334e0 100644 --- a/php-82/DockerFile +++ b/php-82/DockerFile @@ -20,7 +20,20 @@ COPY /resources/scripts/php/install_* /docker-scripts/ # Run Installation Scripts RUN /docker-scripts/install_dependencies.sh sudo vim nano netcat-traditional git iputils-ping dnsutils default-mysql-client -RUN /docker-scripts/install_extensions.sh +RUN install-php-extensions mysqli \ + pdo_mysql \ + mbstring \ + exif \ + pcntl \ + soap \ + gd \ + zip \ + sockets \ + opcache \ + intl \ + redis \ + imagick \ + yaml RUN /docker-scripts/install_users.sh RUN /docker-scripts/install_config.sh RUN /docker-scripts/install_nvm.sh diff --git a/php-83/DockerFile b/php-83/DockerFile new file mode 100644 index 0000000..ba391e0 --- /dev/null +++ b/php-83/DockerFile @@ -0,0 +1,59 @@ +############################################################ +# Dockerfile to create a php container to run the project +############################################################ + +FROM php:8.3-fpm +COPY --from=php:8.3-cli /usr/local/bin/phpdbg /usr/local/bin/ + +# Set working directory +WORKDIR /var/www + +# NVM Settings +ENV NVM_DIR /usr/local/nvm +ENV NVM_VERSION v0.39.3 + +# Copy all config +COPY /resources/config/php/ /docker-config/ + +# Only copy install scripts +COPY /resources/scripts/php/install_* /docker-scripts/ + +# Run Installation Scripts +RUN /docker-scripts/install_dependencies.sh sudo vim nano netcat-traditional git iputils-ping dnsutils default-mysql-client imagemagick +RUN install-php-extensions mysqli \ + pdo_mysql \ + mbstring \ + exif \ + pcntl \ + soap \ + gd \ + zip \ + sockets \ + opcache \ + intl \ + redis \ + imagick/imagick@master \ + yaml +RUN /docker-scripts/install_users.sh +RUN /docker-scripts/install_config.sh +RUN /docker-scripts/install_nvm.sh + +# Copy Entrypoint & Start Scripts etc. +# If these change we don't want to rerun the above layers, hence do this last. +COPY /resources/scripts/php/entrypoint.sh /docker-scripts/entrypoint.sh +COPY /resources/scripts/php/root-start-script.sh /docker-scripts/root-start-script.sh +COPY /resources/scripts/php/www-start-script.sh /docker-scripts/www-start-script.sh +COPY /resources/scripts/php/qa-start-script.sh /docker-scripts/qa-start-script.sh + +# Copy the script to run the scheduler +COPY /resources/scripts/php/run-scheduler.sh /run-scheduler.sh + +ENTRYPOINT [ "/docker-scripts/entrypoint.sh" ] + +# Change to WWW user +USER www + +# Expose port 9000 and start php-fpm server +EXPOSE 9000 + +CMD ["php-fpm"] diff --git a/resources/scripts/php/install_extensions.sh b/resources/scripts/php/install_extensions.sh deleted file mode 100755 index a870fff..0000000 --- a/resources/scripts/php/install_extensions.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# Install some common extensions -install-php-extensions mysqli \ - pdo_mysql \ - mbstring \ - exif \ - pcntl \ - soap \ - gd \ - zip \ - sockets \ - opcache \ - intl \ - redis \ - imagick \ - yaml \ No newline at end of file