Closed sergiorodenas closed 4 months ago
Yeah, without this, using other user won't work, until it gets merged, this is a workaround:
Create a dockerfile with this
FROM serversideup/php:beta-${PHP_VERSION}-fpm-nginx
# TODO: Fix for gosu, remove when this is merged: https://github.com/serversideup/docker-php/pull/287
RUN docker-php-serversideup-dep-install-debian "gosu"
Compose:
laravel-horizon:
build:
context: .
dockerfile: Dockerfile
command: ["gosu", "www-data", "/usr/local/bin/php", "artisan", "horizon"]
Instead of the complexities with changing users, what do you think about this approach instead? https://github.com/serversideup/docker-php/issues/179#issuecomment-2052513529
This can now be closed
Gosu is needed for doing later
command: ["gosu", "www-data", "/usr/local/bin/php", "artisan", "horizon"]
as the su versioncommand: ["su", "www-data", "-c", "/usr/local/bin/php", "artisan", "horizon"]
won't work due the www-data user having the login disabled internally.