Skip to content

Commit d89e838

Browse files
authored
Update Laravel guide (bump to Laravel 12 and php 8.4) (#22699)
<!--Delete sections as needed --> ## Description Introduces small update of the Laravel framework guide (bump versions to the latest Laravel 12 and php 8.4 + updates the related examples repo - the fork needs to be synced). ## Related issues or tickets #21268 ## Reviews <!-- Notes for reviewers here --> As was discussed on the last docs meeting, to simplify the process the review will be sent to the one of Docker Captains first. @igor-alexandrov @ajeetraina - [ ] Technical review - [ ] Editorial review - [ ] Product review
1 parent a6f8367 commit d89e838

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

content/guides/frameworks/laravel/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The demonstrated examples can be found in [this GitHub repository](https://githu
3131

3232
This guide is intended for educational purposes, helping developers adapt and optimize configurations for their specific use cases. Additionally, there are existing tools that support Laravel in containers:
3333

34-
- [Laravel Sail](https://laravel.com/docs/11.x/sail): An official package for easily starting Laravel in Docker.
34+
- [Laravel Sail](https://laravel.com/docs/12.x/sail): An official package for easily starting Laravel in Docker.
3535
- [Laradock](https://github.com/laradock/laradock): A community project that helps run Laravel applications in Docker.
3636

3737
## What you’ll learn

content/guides/frameworks/laravel/development-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ A workspace container provides a dedicated shell for asset compilation, Artisan/
119119
```dockerfile
120120
# docker/development/workspace/Dockerfile
121121
# Use the official PHP CLI image as the base
122-
FROM php:8.3-cli
122+
FROM php:8.4-cli
123123

124124
# Set environment variables for user and group ID
125125
ARG UID=1000

content/guides/frameworks/laravel/prerequisites.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ A fundamental understanding of Docker and how containers work will be helpful. I
1919

2020
## Basic knowledge of Laravel
2121

22-
This guide assumes you have a basic understanding of Laravel and PHP. Familiarity with Laravel’s command-line tools, such as [Artisan](https://laravel.com/docs/11.x/artisan), and its project structure is important for following the instructions.
22+
This guide assumes you have a basic understanding of Laravel and PHP. Familiarity with Laravel’s command-line tools, such as [Artisan](https://laravel.com/docs/12.x/artisan), and its project structure is important for following the instructions.
2323

2424
- Laravel CLI: You should be comfortable using Laravel’s command-line tool (`artisan`).
2525
- Laravel Project Structure: Familiarize yourself with Laravel’s folder structure (`app`, `config`, `routes`, `tests`, etc.).

content/guides/frameworks/laravel/production-setup.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ For production, the `php-fpm` Dockerfile creates an optimized image with only th
4545

4646
```dockerfile
4747
# Stage 1: Build environment and Composer dependencies
48-
FROM php:8.3-fpm AS builder
48+
FROM php:8.4-fpm AS builder
4949

5050
# Install system dependencies and PHP extensions for Laravel with MySQL/PostgreSQL support.
5151
# Dependencies in this stage are only required for building the final image.
@@ -98,7 +98,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
9898
&& composer install --no-dev --optimize-autoloader --no-interaction --no-progress --prefer-dist
9999

100100
# Stage 2: Production environment
101-
FROM php:8.3-fpm
101+
FROM php:8.4-fpm
102102

103103
# Install only runtime libraries needed in production
104104
# libfcgi-bin and procps are required for the php-fpm-healthcheck script
@@ -173,7 +173,7 @@ If you need a separate CLI container with different extensions or strict separat
173173

174174
```dockerfile
175175
# Stage 1: Build environment and Composer dependencies
176-
FROM php:8.3-cli AS builder
176+
FROM php:8.4-cli AS builder
177177

178178
# Install system dependencies and PHP extensions required for Laravel + MySQL/PostgreSQL support
179179
# Some dependencies are required for PHP extensions only in the build stage
@@ -211,7 +211,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
211211
&& composer install --no-dev --optimize-autoloader --no-interaction --no-progress --prefer-dist
212212

213213
# Stage 2: Production environment
214-
FROM php:8.3-cli
214+
FROM php:8.4-cli
215215

216216
# Install client libraries required for php extensions in runtime
217217
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -244,7 +244,7 @@ USER www-data
244244
CMD ["bash"]
245245
```
246246

247-
This Dockerfile is similar to the PHP-FPM Dockerfile, but it uses the `php:8.3-cli` image as the base image and sets up the container for running CLI commands.
247+
This Dockerfile is similar to the PHP-FPM Dockerfile, but it uses the `php:8.4-cli` image as the base image and sets up the container for running CLI commands.
248248

249249
## Create a Dockerfile for Nginx (production)
250250

0 commit comments

Comments
 (0)