// docs
Docker connections
Run Laravel snippets inside an existing local Docker container.
Use a Docker connection when the app only boots correctly inside a container. LaraBench talks to the container with docker exec and runs code from the Laravel app path inside that container.
- Make sure Docker is running.
- Find the container that can run php artisan.
- Open Connections and choose Docker.
- Enter the container name.
- Set the Laravel app path inside the container.
- Optionally set the run-as user if your container needs one.
- Test the connection before using it in Run Code.
docker ps
docker exec -it my-workspace php artisan about