serversideup / docker-php

🐳 Production-ready Docker images for PHP. Optimized for Laravel, WordPress, and more!
https://serversideup.net/open-source/docker-php/
GNU General Public License v3.0
1.75k stars 121 forks source link

Docker Run Commands do not default to the APP_BASE_DIR path #263

Closed jaydrogers closed 10 months ago

jaydrogers commented 10 months ago

Affected Docker Images

Beta-*

Docker Labels of the affected images

No response

Current Behavior

When someone runs the following command, Laravel will install, but the command defaults to the / path. This means the application will not install on the expected volume

Expected Behavior

The command should default to execute in the APP_BASE_DIR

Steps To Reproduce

Run this command:

docker run --rm -v $(pwd):/var/www/html -e "LOG_LEVEL=off" serversideup/php:beta-cli composer create-project laravel/laravel

To Fix

I have to include /var/www/html.

docker run --rm -w /var/www/html -v $(pwd):/var/www/html -e "LOG_LEVEL=off" serversideup/php:beta-cli composer create-project laravel/laravel

Host Operating System

All

Docker Version

All

Anything else?

No response