Skip to content

Commit

Permalink
Merge pull request #3 from d4rkstar/php-openai
Browse files Browse the repository at this point in the history
Php openai
  • Loading branch information
sciabarracom authored May 15, 2024
2 parents 7978791 + bea36b6 commit d6f0a51
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ tasks:
- docker buildx create --name mybuilder --bootstrap --use

clean-images:
- docker images -qa | xargs docker rmi -f
- docker images -a | grep ghcr.io/nuvolaris | awk '{print $3}' | xargs docker rmi -f
- yes | docker buildx prune

build-common:
Expand Down
24 changes: 8 additions & 16 deletions runtime/php/v8.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ARG COMMON=missing:missing
FROM ${COMMON} as builder

FROM php:8.0-cli-buster
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/

# install PHP extensions
RUN apt-get -y update \
Expand All @@ -46,38 +47,29 @@ RUN apt-get -y update \
libzip-dev \
postgresql-server-dev-11 \
\
&& docker-php-ext-install \
&& install-php-extensions \
bcmath \
gd \
intl \
pgsql \
mysqli \
mongodb \
opcache \
pgsql \
pdo_mysql \
pdo_pgsql \
redis \
soap \
zip \
\
&& mkdir -p /usr/src/php/ext/mongodb \
&& curl -fsSL https://pecl.php.net/get/mongodb-1.9.0RC1 | tar xvz -C "/usr/src/php/ext/mongodb" --strip 1 \
&& docker-php-ext-install -j$(nproc) mongodb \
\
&& pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
\
&& apt-get purge -y --auto-remove $PHPIZE_DEPS \
&& apt-get purge -y --auto-remove libclang-common-7-dev clang-7 llvm-7 llvm-7-dev \
&& apt-get purge -y --auto-remove libfreetype6-dev \
libicu-dev \
&& apt-get purge -y --autoremove libfreetype6-dev \
libjpeg-dev \
libpng-dev \
libssl-dev \
libxml2-dev \
libzip-dev \
postgresql-server-dev-11 \
&& apt-get purge -y --auto-remove libclang-common-7-dev clang-7 llvm-7 llvm-7-dev \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& apt-get clean -y \
&& rm -rf /usr/src/php

COPY php.ini /usr/local/etc/php
Expand Down
3 changes: 2 additions & 1 deletion runtime/php/v8.0/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"require": {
"guzzlehttp/guzzle": "7.2.0",
"ramsey/uuid": "4.1.1"
"ramsey/uuid": "4.1.1",
"league/flysystem": "^2.0"
}
}
15 changes: 5 additions & 10 deletions runtime/php/v8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ARG COMMON=missing:missing
FROM ${COMMON} as builder

FROM php:8.1-cli-bullseye
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/

# install PHP extensions
RUN apt-get -y update \
Expand All @@ -45,26 +46,20 @@ RUN apt-get -y update \
libzip-dev \
postgresql-server-dev-13 \
\
&& docker-php-ext-install \
&& install-php-extensions \
bcmath \
gd \
intl \
pgsql \
mysqli \
mongodb \
opcache \
pgsql \
pdo_mysql \
pdo_pgsql \
redis \
soap \
zip \
\
&& mkdir -p /usr/src/php/ext/mongodb \
&& curl -fsSL https://pecl.php.net/get/mongodb-1.14.0 | tar xvz -C "/usr/src/php/ext/mongodb" --strip 1 \
&& docker-php-ext-install -j$(nproc) mongodb \
\
&& pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
\
&& apt-get purge -y --auto-remove $PHPIZE_DEPS \
&& apt-get purge -y --auto-remove libfreetype6-dev \
libicu-dev \
Expand Down
2 changes: 1 addition & 1 deletion runtime/php/v8.1/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"require": {
"guzzlehttp/guzzle": "7.4.5",
"ramsey/uuid": "4.4.0",
"openai-php/client": "v0.8.5"
"league/flysystem": "^3.0"
}
}
15 changes: 5 additions & 10 deletions runtime/php/v8.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ARG COMMON=missing:missing
FROM ${COMMON} as builder

FROM php:8.2-cli-bullseye
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/

# install PHP extensions
RUN apt-get -y update \
Expand All @@ -45,26 +46,20 @@ RUN apt-get -y update \
libzip-dev \
postgresql-server-dev-13 \
\
&& docker-php-ext-install \
&& install-php-extensions \
bcmath \
gd \
intl \
pgsql \
mysqli \
mongodb \
opcache \
pgsql \
pdo_mysql \
pdo_pgsql \
redis \
soap \
zip \
\
&& mkdir -p /usr/src/php/ext/mongodb \
&& curl -fsSL https://pecl.php.net/get/mongodb-1.14.0 | tar xvz -C "/usr/src/php/ext/mongodb" --strip 1 \
&& docker-php-ext-install -j$(nproc) mongodb \
\
&& pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
\
&& apt-get purge -y --auto-remove $PHPIZE_DEPS \
&& apt-get purge -y --auto-remove libfreetype6-dev \
libicu-dev \
Expand Down
3 changes: 2 additions & 1 deletion runtime/php/v8.2/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"require": {
"guzzlehttp/guzzle": "7.7.0",
"ramsey/uuid": "4.7.4",
"openai-php/client": "v0.8.5"
"openai-php/client": "v0.8.5",
"league/flysystem": "^3.0"
}
}
14 changes: 5 additions & 9 deletions runtime/php/v8.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ARG COMMON=missing:missing
FROM ${COMMON} as builder

FROM php:8.3-cli-bookworm
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/

# install PHP extensions
RUN apt-get -y update \
Expand All @@ -46,25 +47,20 @@ RUN apt-get -y update \
libzip-dev \
postgresql-server-dev-15 \
\
&& docker-php-ext-install \
&& install-php-extensions \
bcmath \
gd \
intl \
mysqli \
mongodb \
opcache \
pgsql \
pdo_mysql \
pdo_pgsql \
redis \
soap \
zip \
\
&& mkdir -p /usr/src/php/ext/mongodb \
&& curl -fsSL https://pecl.php.net/get/mongodb-1.14.0 | tar xvz -C "/usr/src/php/ext/mongodb" --strip 1 \
&& docker-php-ext-install -j$(nproc) mongodb \
\
&& pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
\
&& apt-get purge -y --auto-remove $PHPIZE_DEPS \
&& apt-get purge -y --auto-remove libfreetype6-dev \
libicu-dev \
Expand Down
3 changes: 2 additions & 1 deletion runtime/php/v8.3/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"require": {
"guzzlehttp/guzzle": "7.8.1",
"ramsey/uuid": "4.7.5",
"openai-php/client": "v0.8.5"
"openai-php/client": "v0.8.5",
"league/flysystem": "^3.0"
}
}

0 comments on commit d6f0a51

Please sign in to comment.