Skip to content
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

Bug: Fail to run Laravel app on Jammy #622

Open
sophiewigmore opened this issue Dec 7, 2022 · 1 comment
Open

Bug: Fail to run Laravel app on Jammy #622

sophiewigmore opened this issue Dec 7, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@sophiewigmore
Copy link
Member

Expected Behavior

I can run the resulting Laravel app image generating with the buildpacks on the Jammy stack.

Current Behavior

When running docker run --rm -p 8080:8080 --env PORT=8080 jammy-laravel on my app image, it fails when I curl the application:

The stream or file "/workspace/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: The stream or file "/workspace/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
...

Possible Solution

This may be resolved by paketo-buildpacks/composer-install#46, but the issue is that we are trying to write to /workspace at run-time which is not allowed due to paketo-buildpacks/rfcs#188. This may not be fixable at all without a workaround, since PHP wants to stream logs

Steps to Reproduce

  1. Generate a Laravel app (composer create-project laravel/laravel ./example-laravel-app), add extensions (fileinfo, curl, openssl) to .php.ini.d/custom.ini
  2. Build:
pack build jammy-laravel -b paketo-buildpacks/php -e BP_PHP_SERVER=httpd -e BP_PHP_WEB_DIR=public --builder paketobuildpacks/builder-jammy-buildpackless-full
  1. Run app: docker run --rm -p 8080:8080 --env PORT=8080 jammy-laravel
  2. curl localhost:8080

Motivations

Building and reaching a Laravel app with the same steps works on Bionic, but fails on Jammy. Now that we support Jammy Jellyfish with the PHP buildpack, this experience should work.

@sophiewigmore sophiewigmore added the bug Something isn't working label Dec 7, 2022
@pnlinh
Copy link

pnlinh commented Dec 26, 2023

Hi team,

Unfortunately, I also had this problem when build and deployment Laravel 10. Has anyone solved it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants