docker run --rm \
-u "$(id -u):$(id -g)" \
-v "$(pwd):/var/www/html" \
-w /var/www/html \
laravelsail/php81-composer:latest \
composer install --ignore-platform-reqs
./vendor/bin/sail up -d --build --force-recreate --remove-orphans
# -d - Detached mode: Run containers in the background.
# --build - Build images before starting containers.
# --force-recreate - Recreate containers even if their configuration and image haven't changed.
# --remove-orphans - Remove containers for services not defined in the Compose file.
The MIT License (MIT). Please see License File for more information.