Repository navigation
chore: upgrade custom runtime Dockerfiles to PHP 8.3 #2340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,24 @@ | ||
| FROM gcr.io/google_appengine/php72 | ||
| FROM php:8.3-apache | ||
|
|
||
| COPY --from=composer:latest-bin /composer /usr/local/bin/composer | ||
|
|
||
| WORKDIR /var/www/html | ||
| COPY . . | ||
|
|
||
| RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \ | ||
| curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list | ||
| RUN apt-get update && \ | ||
| apt-get -y install gnupg2 curl ca-certificates && \ | ||
| curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg && \ | ||
| curl -fsSL https://packages.microsoft.com/config/debian/12/prod.list > /etc/apt/sources.list.d/mssql-release.list | ||
|
|
||
| RUN apt-get update && \ | ||
| ACCEPT_EULA=Y apt-get -y install \ | ||
| autoconf \ | ||
| build-essential \ | ||
| msodbcsql17 \ | ||
| msodbcsql18 \ | ||
| unixodbc-dev \ | ||
| unzip | ||
|
|
||
| RUN pecl install pdo_sqlsrv | ||
| RUN echo "extension=pdo_sqlsrv.so" > /opt/php72/lib/ext.enabled/ext-pdo_sqlsrv.ini | ||
| # RUN phpenmod pdo_sqlsrv | ||
| RUN pecl install pdo_sqlsrv && \ | ||
| docker-php-ext-enable pdo_sqlsrv | ||
| RUN sed -i 's/80/8080/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf | ||
| RUN composer update | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,12 @@ | ||
| # The Google App Engine php runtime is Debian Jessie with PHP installed | ||
| # and various os-level packages to allow installation of popular PHP | ||
| # libraries. The source is on github at: | ||
| # https://github.com/GoogleCloudPlatform/php-docker | ||
| FROM gcr.io/google_appengine/php | ||
| # Use the official PHP 8.3 Apache image for App Engine Flexible custom runtimes. | ||
| # https://hub.docker.com/_/php | ||
| FROM php:8.3-apache | ||
|
|
||
| COPY --from=composer:latest-bin /composer /usr/local/bin/composer | ||
|
|
||
| WORKDIR /var/www/html | ||
| COPY . . | ||
|
|
||
| RUN apt-get update && apt-get -y install unzip && \ | ||
| composer install --no-dev && \ | ||
| sed -i 's/80/8080/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf | ||
|
Comment on lines
+10
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To keep the Docker image size small, use |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To minimize the Docker image size and follow best practices, it is recommended to use the
--no-install-recommendsflag withapt-get installand clean up the local package repository cache by removing/var/lib/apt/lists/*in the sameRUNinstruction.