Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion bin/php84/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ RUN apt-get -y update --fix-missing && \

RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini

RUN { \
echo 'pdo_mysql.default_socket=/run/mysqld/mysqld.sock'; \
echo 'mysqli.default_socket=/run/mysqld/mysqld.sock'; \
} > /usr/local/etc/php/conf.d/docker-mysql-socket.ini

# Install useful tools and install important libaries
RUN apt-get -y update && \
apt-get -y --no-install-recommends install nano wget \
Expand Down Expand Up @@ -83,9 +88,10 @@ RUN docker-php-ext-install pdo_mysql && \
RUN apt-get -y update && \
apt-get --no-install-recommends install -y libfreetype6-dev \
libjpeg62-turbo-dev \
libwebp-dev \
libpng-dev && \
rm -rf /var/lib/apt/lists/* && \
docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg && \
docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg --with-webp && \
docker-php-ext-install gd

# Insure an SSL directory exists
Expand Down
5 changes: 4 additions & 1 deletion config/php/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ memory_limit = 256M
post_max_size = 100M
upload_max_filesize = 100M

pdo_mysql.default_socket = /run/mysqld/mysqld.sock
mysqli.default_socket = /run/mysqld/mysqld.sock

# Xdebug 2
#xdebug.remote_enable=1
#xdebug.remote_autostart=1
Expand All @@ -14,4 +17,4 @@ upload_max_filesize = 100M
#xdebug.start_with_request=yes
#xdebug.client_host=host.docker.internal
#xdebug.client_port=9003
#xdebug.idekey=VSCODE
#xdebug.idekey=VSCODE
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ services:
- ${VHOSTS_DIR-./config/vhosts}:/etc/apache2/sites-enabled
- ${LOG_DIR-./logs/apache2}:/var/log/apache2
- ${XDEBUG_LOG_DIR-./logs/xdebug}:/var/log/xdebug
- ${MYSQL_SOCKET_DIR-./data/mysql-socket}:/run/mysqld
environment:
APACHE_DOCUMENT_ROOT: ${APACHE_DOCUMENT_ROOT-/var/www/html}
PMA_PORT: ${HOST_MACHINE_PMA_PORT}
Expand All @@ -39,10 +40,13 @@ services:
volumes:
- ${MYSQL_INITDB_DIR-./config/initdb}:/docker-entrypoint-initdb.d
- ${MYSQL_DATA_DIR-./data/mysql}:/var/lib/mysql
- ${MYSQL_SOCKET_DIR-./data/mysql-socket}:/run/mysqld
- ${MYSQL_LOG_DIR-./logs/mysql}:/var/log/mysql
- ${MYSQL_CNF-./config/mysql/my.cnf}:/etc/my.cnf
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
Expand Down