With this command you can launch a standalone cli
container within the scope of the current directory.
The directory is mapped into /var/www
in the container.
This gives you access to all of the tools available in docksal/cli
without launching an entire Docksal stack.
This also eliminates the need of having any of the console tools present in docksal/cli
installed locally on the host.
You can run any Linux command or script (Bash, PHP, Python, Ruby, Nodejs, etc.) in a safe, disposable environment:
fin run-cli <command or script>
The container will only have access to the current directory scope on the host. The results of the execution can be stored in the same directory.
Any other changes happen inside of the container only and are reset once the container is stopped.
fin run-cli composer create-project drupal/recommended-project myproject --no-interaction
You can then initialize the default Docksal stack (LAMP) for the new project with just a few more steps:
cd myproject
fin init
Generally, anything you do inside of a fin run-cli
environment is gone once the container is stopped.
You can install new packages, run scripts, break things, etc., without the risk of damaging your host system.
The next time you do fin run-cli
, the run-cli
environment is started fresh and clean.
The only exceptions are:
/var/www
inside the container)$HOME
(/home/docker
) directory inside the containerWith /home/docker
directory persisting between fin run-cli
executions you get the benefit of a shared cache space.
You have the option to override this behavior and launch the container without the persistent $HOME
volume:
fin run-cli --clean
Note: this does not drop the shared $HOME
volume used for regular fin run-cli
executions.
You can wipe the shared $HOME
volume with:
fin run-cli --cleanup
See fin help run-cli
for more details.
Was this page helpful?
Thanks for the feedback. If you have a specific, answerable question about how to use Docksal, ask it in Discussions on GitHub. Open an issue if you want to report a problem or suggest an improvement. You can also contribute changes to this page using the link in the top right corner.