The docker:setup
command generates a basic Docker setup for a PHP library. It creates necessary directories and copies configuration files to enable Docker support for the library.
vendor/bin/whitecat docker:setup
The command does not accept any additional options or arguments. It is a self-contained setup process.
To execute the docker:setup
command, run the following:
vendor/bin/whitecat docker:setup
The command performs the following tasks:
- Checks for the existence of the Docker directory. If it doesn't exist, it creates the directory.
- Copies PHP 8.1 configuration files from the Docker directory to the specified distribution directory.
- Copies the
docker-compose.yml
file to the specified distribution directory.
The command prompts the user for confirmation in the following scenarios:
- If the Docker directory already exists, the user can choose to continue and override it.
- If the PHP 8.1 configuration already exists, the user can choose to override it.
- If the
docker-compose.yml
file already exists, the user can choose to override it.
Upon successful execution, the command outputs a success message.
If any errors occur during directory or file creation, appropriate error messages are displayed.