LakeDropsDrupalDev - L3D¶
Provides fully configured Docker images for local Drupal development where your local host requires nothing else than Docker being installed but no PHP, Composer or any other tool on this planet. It simply works.
Nothing else than docker being installed on your host. You don't need any other tool - none!
Please refer to the official Docker documentation to quickly find out how to install docker on your platform.
Depending on your system setup you may also want to add your own user to the group
If your IDE doesn't come with integrated Git support, you may also have to install tools like Git, Git Flow or Git LFS - but all that depends on your specific needs. Usually all you need can be found inside of the L3D containers and you don't have to install any other tool on your host at all.
Quick start Linux¶
You can install the tool with the following command:
This will install the script
l3d into the given directory
/usr/local/bin from where it is executable everywhere on your host (assuming this path being in your search path). If you want that script to be installed elsewhere then provide that alternative path in the install command above. Instead of
latest you can also start with any other specific version number of this tool. You can find all available version strings in the tag list of this project.
Quick start MacOS¶
Use the following command to install L3D (replace
myname with your correct username):
Then make sure that the directory
/Users/myname/bin is included in the PATH environment variable or create a symbolic link in
/usr/local/bin. If you work with a symbolic link, MacOS also requires coreutils which can be installed with
brew install coreutils or
sudo port install coreutils.
As you will require SSH functionality in most development environments, let's make sure that this really works. In order to find out if your host is properly configured to use (and forward) SSH authentication, you should call
ssh-add -l and see if it lists your public key(s). if it doesn't, just call
ssh-add to add you public keys to the ssh agent. If this doesn't persist after a reboot of you host on MacOS, then please follow these instructions.
To test SSH easily, you can do something like this:
1 2 3 4 5
The same test also works with other hosts where your public key is configured as your authentication method. Please note, you can repeat these SSH tests inside the L3D container later on as well and they should produce the very same results.
Go to the project root for which you want to use L3D and execute the installed script: simply type
l3d at the command prompt.
It will ask you for the PHP version (input
8.0), the project name and template to be used. Then it will download the matching L3D image and start a container for you. Furthermore you can choose, if want to use composer 1 for some reason. To downgrade just set the value
1. The default is the version 2.
Inside the container you'll find the directory
/drupal which contains everything from your project's root. You can work from there by using these available tools:
LakeDrops Drupal 8 or Drupal 9 project template¶
If you have chosen the LakeDrops Drupal 8 or Drupal 9 project template, type 'a d4d up' at the command prompt within the container to start the remaining containers.
'drush status' will then show you the URL of your project.
Update the start script¶
l3d selfupdate and the start script will be updated from the original repository. This will also update all your existing L3D images and remove the outdated containers so that they will be recreated the next timne you're going to use them.
Sometimes the mounted volumes into existing containers will change, e.g. after a reboot on a Mac, the directory where the SSH-Agent stores their information will have gotten a different name. In such situations, starting one of the existing containers will throw error messages to the console. To resolve this, all L3D-related existing containers need to be rebuilt.
You chould call
l3d reset which cleans up all the related containers and prepares the system such that next call to L3D will rebuild those required containers from scratch. Note that removing containers will not remove their volumes. This is a good thing, because it makes sure that all your data will remain intact and will be used by the newly created containers just as before.
Working with Git credentials¶
In order to commit and push with git you have to at least configure your email address and username for the git client. If you configure those globally on your host, each of the L3D containers will inherit those settings and there is nothing that needs to be done inside the container.
To configure those credentials, use these commands:
Configuring the shell¶
By default, L3D tries to use the same shell inside the containers that you also use on your host. If that's not possible, it falls back to FISH.
If you want to overwrite the shell deliberatly, then define an environment variable on your host, like e.g.
Note that only new containers will get affected by this setting.
l3d help displays information about L3D and provides a link to further details.
Start a new project¶
1 2 3 4
You will be presented with a list of options on how to get started and you can simply follow the instructions on screen.
Use with an existing project¶
1 2 3