Download the PHP package hugochinchilla/botanist without Composer
On this page you can find all versions of the php package hugochinchilla/botanist. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hugochinchilla/botanist
More information about hugochinchilla/botanist
Files in hugochinchilla/botanist
Package botanist
Short Description Removes all the roots from your project dir
License GPL-3.0-only
Informations about the package botanist
Botanist 🪴
Add this plugin to your composer.json
to prevent composer from creating files owned by root while running on docker.
Why this project?
Something I like a lot is being able to run any development environment just by running docker compose up
after cloning
it, without having to set up anything, no need to read the readme file, for me that is devex bliss.
A typical problem setting docker to run with a user different that root is needing to customize your user id in a dotenv file before being able to start the project, and that makes me unhappy.
How does it work?
It sets a hook to run after commands that may write the vendor/
dir or update the composer.lock
file.
The hook will check the parent dir owner/group and will set the same ownership to the files.
It can only perform this action if composer is run as root, so if you don't install it as root you will not see the ownership changed until you execute any install/update as root.
Is it better than running docker as not root?
No. The best practice is to not run containers as root, but if you are running it as root nonetheless, this will solve a common issue.
What's the alternative?
You can use a mix of a dotenv file and the following snippet:
This will run the docker container as the same user as yours. If you don't define the USER_ID in the dotenv file it will use 1000 as default value, there is a great chance that this is your id anyway.
But if you want to have a repo that can be cloned by any user and just run with docker compose up
without any
prior setup, use botanist.
All versions of botanist with dependencies
ext-posix Version *
composer-plugin-api Version ^2.0
symfony/filesystem Version >=2.1