Automatic Docker Laravel Local Environment Setup

This script will automatically set up a local development environment for Laravel using Docker. It will install Docker, Docker Compose, and set up a Laravel project with the necessary configurations.

To run the setup, execute the following command in your terminal:


curl -sSL https://oakbox.com/oakbox/docker_env_setup.sh | bash
        

After the script completes, you can access your Laravel application via your own web browser. This script should work on most Linux distributions and macOS. Make sure you have Docker installed and running before executing the script.

Once installed, you can interact with the docker environment(s) using the included Makefile.

The only caveat to using make like this: You need to double-quote your commands if they are longer that two words. make artisan route:list works fine, but anything more needs quotes so that make will treat the variables nicely: make artisan "make:migration alter_user_table"

Agents

Here is the section of my AGENTS.md file that deals with this issue. You need to tell your coding harness how to run commands in the docker environment:

## High-value commands

- Run Artisan in containers: `make artisan "command"`.
- Run Composer in containers: `make composer "args"`.
- Run npm in containers: `make npm "args"` .
- IMPORTANT: make has a quirk that requires that everything after the 'command' must be in quotes. `make command "args"`