From a2e7e47dbf669b509597966b806ad2daaa1182bb Mon Sep 17 00:00:00 2001 From: Aditya Prima Date: Sun, 3 Dec 2023 09:42:59 +0700 Subject: [PATCH] Updated dockerfile and added mysql support for ubuntu based image --- Dockerfile_ubuntu | 7 ++++++- Dockerfile_ubuntu_mysql | 24 +++++++++++++++++++----- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Dockerfile_ubuntu b/Dockerfile_ubuntu index 63cf368..c956f6e 100644 --- a/Dockerfile_ubuntu +++ b/Dockerfile_ubuntu @@ -25,7 +25,7 @@ RUN --mount=type=cache,target=/var/cache/apt/archives \ php${PHP_VERSION}-cgi php${PHP_VERSION}-curl \ php${PHP_VERSION}-dba php${PHP_VERSION}-dev php${PHP_VERSION}-gd \ php${PHP_VERSION}-http php${PHP_VERSION}-imagick php${PHP_VERSION}-intl \ - php${PHP_VERSION}-json php${PHP_VERSION}-mbstring php${PHP_VERSION}-memcache \ + php${PHP_VERSION}-mbstring php${PHP_VERSION}-memcache \ php${PHP_VERSION}-memcached php${PHP_VERSION}-pspell \ php${PHP_VERSION}-readline php${PHP_VERSION}-xml \ php${PHP_VERSION}-xmlrpc php${PHP_VERSION}-zip @@ -36,6 +36,11 @@ RUN --mount=type=cache,target=/var/cache/apt/archives \ php${PHP_VERSION}-autoload php${PHP_VERSION}-date php${PHP_VERSION}-monolog \ php${PHP_VERSION}-psr; exit 0 +# FAILING ON PHP-8.0 +RUN --mount=type=cache,target=/var/cache/apt/archives \ + apt -y install \ + php${PHP_VERSION}-json; exit 0 + # REMOVE CURRENT POOL FIRST RUN rm -rf /etc/php/${PHP_VERSION}/fpm/pool.d diff --git a/Dockerfile_ubuntu_mysql b/Dockerfile_ubuntu_mysql index 09351a4..922cf39 100644 --- a/Dockerfile_ubuntu_mysql +++ b/Dockerfile_ubuntu_mysql @@ -1,9 +1,9 @@ -ARG PHP_VERSION=8.1 +ARG PHP_VERSION=8.3 -FROM aprimediet/php:${UBUNTU_VERSION} +FROM aprimediet/php:${PHP_VERSION}-ubuntu LABEL maintainer=" aprimediet@gmail.com" -ARG PHP_VERSION=8.1 +ARG PHP_VERSION=8.3 WORKDIR /root @@ -11,7 +11,21 @@ WORKDIR /root RUN --mount=type=cache,target=/var/cache/apt/archives \ apt -y update && apt -y upgrade -# INSTALL BASE DEPENDENCIES +# INSTALL MYSQL DEPENDENCIES RUN --mount=type=cache,target=/var/cache/apt/archives \ apt -y install \ - php${PHP_VERSION}- \ No newline at end of file + php${PHP_VERSION}-pdo; exit 0 + +RUN --mount=type=cache,target=/var/cache/apt/archives \ + apt -y install \ + php${PHP_VERSION}-mysql; exit 0 + +RUN --mount=type=cache,target=/var/cache/apt/archives \ + apt -y install \ + php${PHP_VERSION}-mysqlnd; exit 0 + +RUN --mount=type=cache,target=/var/cache/apt/archives \ + apt -y install \ + php${PHP_VERSION}-mysqli; exit 0 + +EXPOSE 9000 \ No newline at end of file