Environment & Platform
Workspace access, host-specific tuning, and scheduling.
Access the workspace over SSH
Reach the Workspace at localhost:2222 by setting WORKSPACE_INSTALL_WORKSPACE_SSH=true in your .env and rebuilding the workspace.
To change the forwarded port, add it to your .env (the default lives in workspace/defaults.env):
WORKSPACE_SSH_PORT=2222
Then connect:
ssh -o PasswordAuthentication=no \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
-p 2222 \
-i workspace/insecure_id_rsa \
laradock@localhost
Replace
laradock@localhostwithroot@localhostto log in as root.
Change the timezone
Set WORKSPACE_TIMEZONE in your .env to any value from the TZ database, then rebuild. For example, New York:
WORKSPACE_TIMEZONE=America/New_York
We also recommend setting the timezone in Laravel.
Add locales to PHP-FPM
Add locales
- In
.env, setPHP_FPM_INSTALL_ADDITIONAL_LOCALEStotrue. - Add the locale codes to
PHP_FPM_ADDITIONAL_LOCALES. - Rebuild:
docker compose build php-fpm. - Check them:
docker compose exec php-fpm locale -a.
Change the default locale (default is POSIX):
- In
.env, setPHP_FPM_DEFAULT_LOCALEto your locale, for exampleen_US.UTF8. - Rebuild:
docker compose build php-fpm. - Check it:
docker compose exec php-fpm locale.
Add cron jobs
Add your cron jobs to workspace/crontab/laradock, after the php artisan line:
* * * * * laradock /usr/bin/php /var/www/artisan schedule:run >> /dev/null 2>&1
# Custom cron
* * * * * root echo "Every Minute" > /var/log/cron.log 2>&1
Change the timezone if you don't want UTC. On Windows, make sure this file uses LF line endings, or the cron jobs silently fail.
Improve speed on macOS
Sharing your code from macOS into containers is slower than on Linux because every file read crosses the host/VM boundary. Recent Docker Desktop fixes most of this on its own, so the steps below go from "do this first" to "only if you still need it."
1. Enable VirtioFS (fixes most cases). In Docker Desktop, open Settings → General → Choose file sharing implementation for your containers and pick VirtioFS, then Apply & Restart. It is the default on recent Docker Desktop and is dramatically faster than the older osxfs / gRPC FUSE backends. For most projects this alone is enough.
2. Tune the mount flag. Laradock mounts your code using the APP_CODE_CONTAINER_FLAG value in your .env (default :cached). Keep :cached for most apps. If your app writes heavily to the mounted volume, :delegated can be faster, at the cost of the container's view lagging the host by a moment:
APP_CODE_CONTAINER_FLAG=:delegated
3. Keep large directories out of the bind mount. The real cost is bind-mounting tens of thousands of files. Directories your host doesn't need to read, such as vendor/ and node_modules/, are best kept in a Docker volume instead of the host mount so they never cross the file-sharing boundary.
4. Still too slow? Use Mutagen. For very large codebases, Mutagen syncs your files into a native container volume in the background, giving near-Linux speed. It is the maintained successor to the old docker-sync approach.