Skip to content

Commit

Permalink
Upgrades to PHP 8.3 in Docker image.
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoFara committed Nov 23, 2024
1 parent 7cc7734 commit 5237cb0
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
FROM php:8.1-apache-bullseye
FROM php:8.3-apache-bullseye

LABEL org.opencontainers.image.title="LWT Community"
LABEL org.opencontainers.image.description="An image for LWT"
LABEL org.opencontainers.image.documentation="https://hugofara.github.io/lwt/docs/"
LABEL org.opencontainers.image.url="https://hugofara.github.io/lwt/"
LABEL org.opencontainers.image.author="HugoFara <[email protected]>"
LABEL org.opencontainers.image.author="HugoFara <[email protected]>"
LABEL org.opencontainers.image.license=Unlicense
LABEL org.opencontainers.image.source="https://github.com/HugoFara/lwt"


# creating config file php.ini
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" && \
echo 'mysqli.allow_local_infile = On' >> "$PHP_INI_DIR/php.ini"

RUN docker-php-ext-install pdo pdo_mysql mysqli
echo 'mysqli.allow_local_infile = On' >> "$PHP_INI_DIR/php.ini"; \
docker-php-ext-install pdo pdo_mysql mysqli

COPY . /var/www/html/lwt

Expand All @@ -23,5 +22,9 @@ ARG DB_USER=root
ARG DB_PASSWORD=root
ARG DB_DATABASE=learning-with-texts

RUN printf '<?php\n$server = "%s";\n$userid = "%s";\n$passwd = "%s";\n$dbname = "%s";\n?>' "$DB_HOSTNAME" "$DB_USER" "$DB_PASSWORD" "$DB_DATABASE" > /var/www/html/lwt/connect.inc.php

RUN printf '<?php\n$server = "%s";\n$userid = "%s";\n$passwd = "%s";\n$dbname = "%s";\n?>' \
"$DB_HOSTNAME" \
"$DB_USER" \
"$DB_PASSWORD" \
"$DB_DATABASE" \
> /var/www/html/lwt/connect.inc.php

0 comments on commit 5237cb0

Please sign in to comment.