Skip to main content

Workspace

What is the Workspace container?

workspace is Laradock's general-purpose development shell, the container you exec into to run Composer, Artisan, Git, Node/npm, and most other CLI work against your mounted project code. It's built from the laradock/workspace base image (tagged by PHP version) and runs as a non-root laradock user matched to your host UID/GID, so files it creates aren't owned by root.

Unlike php-fpm, it's not what actually serves your app to a browser, nginx/apache talk to php-fpm for that. workspace is where you sit and type commands.

Enter the Workspace

The fastest path in is the dedicated shortcut, it starts workspace for you if it isn't running yet (equivalent to the Start the Workspace command below), then drops you in as the non-root laradock user:

./laradock workspace

You land in /var/www (your project, mounted from APP_CODE_PATH_HOST) as the laradock user. Pass --root (CLI only: ./laradock workspace --root) to land as root instead, useful for one-off apt-get installs.

ws and shell also work as shorthands for ./laradock workspace.

Start the Workspace

If you'd rather start it explicitly, without entering a shell, for example alongside other services:

./laradock start workspace

Name any other services alongside it to start them together, for example ./laradock start nginx mysql workspace.

Stop the Workspace

./laradock stop workspace

What's installed by default

A handful of WORKSPACE_INSTALL_* / WORKSPACE_* flags in workspace/defaults.env default to true (everything else defaults to false):

VariableDefaultWhat it does
WORKSPACE_INSTALL_NODEtrueNode.js via NVM (WORKSPACE_NODE_VERSION=node tracks latest).
WORKSPACE_INSTALL_YARNtrueYarn package manager.
WORKSPACE_INSTALL_NPM_GULPtrueGulp CLI, global npm install.
WORKSPACE_INSTALL_NPM_VUE_CLItrueVue CLI, global npm install.
WORKSPACE_INSTALL_PHPREDIStruePHP Redis extension (for CLI scripts, Artisan, etc.).
WORKSPACE_INSTALL_ASTtruePHP AST extension.
WORKSPACE_INSTALL_MEMCACHEDtruePHP Memcached extension.
WORKSPACE_INSTALL_DNSUTILStruedig/nslookup and friends.
WORKSPACE_INSTALL_JDKtrueJava Development Kit.
WORKSPACE_COMPOSER_GLOBAL_INSTALLtrueRuns composer global install at build time.
WORKSPACE_COMPOSER_VERSION2Composer major version (1, 2, 2.2, or a specific version string).

Pick your tools with the CLI

The wizard asks about workspace tools directly, so you don't have to know a flag name to find a tool. Step 8 of ./laradock setup is a searchable, grouped picker over every tool below, with what you already have pre-ticked:

./laradock setup
----------------------------------------------------------------------
Step 8 of 10 Workspace tools
----------------------------------------------------------------------
The workspace is your dev shell: the container you run php, composer, artisan,
npm and git inside (./laradock workspace). These are the tools baked into it.

Debug & testing
[ ] xdebug
[x] pcov
Node & frontend
[x] node
...
type to filter · arrows move · space toggles on/off · enter when done

Type to filter (xde finds xdebug), space to toggle, enter to accept. Only the tools you actually change are written to your .env, so it stays a short diff of your choices rather than a copy of all ~87 flags. When you change something, the CLI reminds you to rebuild.

It's safe to re-run ./laradock setup any time to add or remove tools later; your current answers are pre-filled.

The WORKSPACE_INSTALL_* toggle pattern

If you'd rather not use the wizard, every tool is just an on/off flag in workspace/defaults.env: WORKSPACE_INSTALL_<THING>=false. Flip one to true in your .env, then rebuild:

WORKSPACE_INSTALL_XDEBUG=true
WORKSPACE_INSTALL_DRUSH=true
WORKSPACE_INSTALL_WP_CLI=true
./laradock rebuild workspace

Then restart it to pick up the new build:

./laradock restart workspace

To turn one back off, either untick it in ./laradock setup, or:

./laradock unset WORKSPACE_INSTALL_XDEBUG # back to the shipped default
./laradock rebuild workspace

Removing a tool rebuilds the image without it. Your code and database are untouched: the workspace holds no data of its own, only tools.

Every tool you can install

The complete list, grouped the same way the ./laradock setup picker groups them. On = installed unless you turn it off. Names in the first column are what you type in the picker; the flag is what you'd set by hand.

Debug & testing

ToolFlagDefaultWhat it does
xdebugWORKSPACE_INSTALL_XDEBUGoffStep debugger and profiler. See the Xdebug + IDE guide.
pcovWORKSPACE_INSTALL_PCOVoffFast code-coverage driver for PHPUnit (much quicker than Xdebug's).
phpdbgWORKSPACE_INSTALL_PHPDBGoffPHP's built-in interactive debugger, also usable for coverage.
dusk-depsWORKSPACE_INSTALL_DUSK_DEPSoffChrome and the libraries Laravel Dusk needs for browser tests (amd64 only).
taintWORKSPACE_INSTALL_TAINToffStatic analysis extension that flags possible XSS in strings.

Node & frontend

ToolFlagDefaultWhat it does
nodeWORKSPACE_INSTALL_NODEonNode.js via NVM. Version set by WORKSPACE_NODE_VERSION.
yarnWORKSPACE_INSTALL_YARNonYarn package manager.
pnpmWORKSPACE_INSTALL_PNPMoffpnpm package manager.
npm-gulpWORKSPACE_INSTALL_NPM_GULPonGulp task runner CLI, installed globally.
npm-vue-cliWORKSPACE_INSTALL_NPM_VUE_CLIonVue CLI, installed globally.
npm-angular-cliWORKSPACE_INSTALL_NPM_ANGULAR_CLIoffAngular CLI, installed globally.
npm-bowerWORKSPACE_INSTALL_NPM_BOWERoffBower, the legacy frontend package manager.
npm-check-updates-cliWORKSPACE_INSTALL_NPM_CHECK_UPDATES_CLIoffncu, checks your package.json for newer versions.

Database clients & drivers

ToolFlagDefaultWhat it does
mysql-clientWORKSPACE_INSTALL_MYSQL_CLIENToffThe mysql command, for a SQL shell or mysqldump from the workspace.
pg-clientWORKSPACE_INSTALL_PG_CLIENToffThe psql command and Postgres client tools.
mongoWORKSPACE_INSTALL_MONGOoffPHP MongoDB driver.
mssqlWORKSPACE_INSTALL_MSSQLoffPHP SQL Server driver (sqlsrv/pdo_sqlsrv).
oci8WORKSPACE_INSTALL_OCI8offPHP Oracle driver. Needs the Instant Client files.
cassandraWORKSPACE_INSTALL_CASSANDRAoffPHP Cassandra driver.
aerospikeWORKSPACE_INSTALL_AEROSPIKEoffPHP Aerospike driver.
ssdbWORKSPACE_INSTALL_SSDBoffPHP SSDB client.
rdkafkaWORKSPACE_INSTALL_RDKAFKAoffPHP Kafka client. See the section below.
zookeeperWORKSPACE_INSTALL_ZOOKEEPERoffPHP ZooKeeper client.

PHP extensions

ToolFlagDefaultWhat it does
phpredisWORKSPACE_INSTALL_PHPREDISonRedis extension, so Artisan and CLI scripts can talk to Redis.
memcachedWORKSPACE_INSTALL_MEMCACHEDonMemcached extension.
apcuWORKSPACE_INSTALL_APCUoffIn-memory user cache (APCu).
amqpWORKSPACE_INSTALL_AMQPoffAMQP extension, for RabbitMQ.
gearmanWORKSPACE_INSTALL_GEARMANoffGearman job-queue client.
eventWORKSPACE_INSTALL_EVENTofflibevent bindings for async PHP.
swooleWORKSPACE_INSTALL_SWOOLEoffCoroutine/async runtime used by Octane, Hyperf.
soapWORKSPACE_INSTALL_SOAPoffSOAP client/server.
gnupgWORKSPACE_INSTALL_GNUPGoffGnuPG encryption bindings.
gmpWORKSPACE_INSTALL_GMPoffArbitrary-precision maths.
bz2WORKSPACE_INSTALL_BZ2offbzip2 compression.
imapWORKSPACE_INSTALL_IMAPoffIMAP mailbox access.
ldapWORKSPACE_INSTALL_LDAPoffLDAP / Active Directory auth.
mailparseWORKSPACE_INSTALL_MAILPARSEoffParse raw email messages.
phpdecimalWORKSPACE_INSTALL_PHPDECIMALoffCorrectly-rounded decimal maths, for money.
ssh2WORKSPACE_INSTALL_SSH2offSSH/SFTP from PHP.
xmlrpcWORKSPACE_INSTALL_XMLRPCoffXML-RPC client/server.
xslWORKSPACE_INSTALL_XSLoffXSLT transforms.
yamlWORKSPACE_INSTALL_YAMLoffFast YAML parsing.
zmqWORKSPACE_INSTALL_ZMQoffZeroMQ messaging.
traderWORKSPACE_INSTALL_TRADERoffTechnical-analysis functions.
xlswriterWORKSPACE_INSTALL_XLSWRITERoffWrite large Excel files quickly.
v8jsWORKSPACE_INSTALL_V8JSoffRun JavaScript from PHP via V8.
phalconWORKSPACE_INSTALL_PHALCONoffThe Phalcon framework extension.
astWORKSPACE_INSTALL_ASTonExposes PHP's syntax tree. Needed by Phan and other static analysers.
ioncubeWORKSPACE_INSTALL_IONCUBEoffionCube loader for encoded PHP. Not available on PHP 8.0 or 8.4+.

Framework CLIs

ToolFlagDefaultWhat it does
laravel-installerWORKSPACE_INSTALL_LARAVEL_INSTALLERoffThe laravel new command.
laravel-envoyWORKSPACE_INSTALL_LARAVEL_ENVOYoffEnvoy task runner for remote deploys.
symfonyWORKSPACE_INSTALL_SYMFONYoffThe Symfony CLI.
deployerWORKSPACE_INSTALL_DEPLOYERoffDeployer, the PHP deployment tool.
drushWORKSPACE_INSTALL_DRUSHoffDrupal's command line.
drupal-consoleWORKSPACE_INSTALL_DRUPAL_CONSOLEoffDrupal Console.
wp-cliWORKSPACE_INSTALL_WP_CLIoffThe wp command, for WordPress.
prestissimoWORKSPACE_INSTALL_PRESTISSIMOoffParallel downloads for Composer 1. Pointless on Composer 2.

Media & documents

ToolFlagDefaultWhat it does
imagemagickWORKSPACE_INSTALL_IMAGEMAGICKoffImage manipulation, plus the PHP imagick extension.
libpngWORKSPACE_INSTALL_LIBPNGoffPNG libraries some image tools need.
ffmpegWORKSPACE_INSTALL_FFMPEGoffAudio/video transcoding.
audiowaveformWORKSPACE_INSTALL_AUDIOWAVEFORMoffBBC waveform data generator.
image-optimizersWORKSPACE_INSTALL_IMAGE_OPTIMIZERSoffjpegoptim, optipng, pngquant, svgo and friends.
wkhtmltopdfWORKSPACE_INSTALL_WKHTMLTOPDFoffRender HTML to PDF.
poppler-utilsWORKSPACE_INSTALL_POPPLER_UTILSoffpdftotext and other PDF tools.
graphvizWORKSPACE_INSTALL_GRAPHVIZoffRender .dot graphs to images.

Shell & tools

ToolFlagDefaultWhat it does
git-promptWORKSPACE_INSTALL_GIT_PROMPToffShow the current branch in your shell prompt.
powerlineWORKSPACE_INSTALL_POWERLINEoffPowerline status line for the prompt.
mcWORKSPACE_INSTALL_MCoffMidnight Commander, a terminal file manager.
lnavWORKSPACE_INSTALL_LNAVoffLog file navigator.
linuxbrewWORKSPACE_INSTALL_LINUXBREWoffHomebrew for Linux, for anything not listed here.
gnu-parallelWORKSPACE_INSTALL_GNU_PARALLELoffRun shell jobs in parallel.
fswatchWORKSPACE_INSTALL_FSWATCHoffWatch files and react to changes.
inotifyWORKSPACE_INSTALL_INOTIFYoffPHP inotify bindings for file watching.
pingWORKSPACE_INSTALL_PINGoffThe ping command.
dnsutilsWORKSPACE_INSTALL_DNSUTILSondig, nslookup, for debugging container DNS.
sshpassWORKSPACE_INSTALL_SSHPASSoffNon-interactive SSH passwords, for scripts.
subversionWORKSPACE_INSTALL_SUBVERSIONoffThe svn client.
smbWORKSPACE_INSTALL_SMBoffSMB/CIFS client, for Windows shares.
supervisorWORKSPACE_INSTALL_SUPERVISORoffKeep queue workers and daemons running.

DevOps

ToolFlagDefaultWhat it does
docker-clientWORKSPACE_INSTALL_DOCKER_CLIENToffThe docker command inside the workspace. See Docker-in-Docker.
terraformWORKSPACE_INSTALL_TERRAFORMoffThe Terraform CLI.
github-cliWORKSPACE_INSTALL_GITHUB_CLIoffThe gh command.
protocWORKSPACE_INSTALL_PROTOCoffProtocol Buffers compiler.
workspace-sshWORKSPACE_INSTALL_WORKSPACE_SSHoffRun an SSH server in the workspace. See SSH into the Workspace.

Other languages

ToolFlagDefaultWhat it does
pythonWORKSPACE_INSTALL_PYTHONoffPython 2 and pip.
python3WORKSPACE_INSTALL_PYTHON3offPython 3 and pip3.
jdkWORKSPACE_INSTALL_JDKonJava Development Kit. Only needed for tools that run on Java.

See the sections below for setup instructions on individual tools, and the PHP-FPM guide for extension-specific install/config guides (Xdebug, pcov, phpdbg, YAML, rdkafka, ionCube, etc.) that apply to workspace as well as php-fpm.

Published ports

workspace/compose.yml exposes several dev-server ports on the host, all overridable in .env:

VariableDefaultUsed for
WORKSPACE_SSH_PORT2222SSH into the container (if WORKSPACE_INSTALL_WORKSPACE_SSH=true).
WORKSPACE_BROWSERSYNC_HOST_PORT3000Browsersync.
WORKSPACE_BROWSERSYNC_UI_HOST_PORT3001Browsersync UI.
WORKSPACE_VUE_CLI_SERVE_HOST_PORT8080vue-cli-service serve.
WORKSPACE_VUE_CLI_UI_HOST_PORT8001Vue CLI UI.
WORKSPACE_ANGULAR_CLI_SERVE_HOST_PORT4200Angular CLI dev server.
WORKSPACE_VITE_PORT5173Vite dev server.

User and permissions

WORKSPACE_PUID/WORKSPACE_PGID (default 1000/1000) set the UID/GID of the laradock user inside the container. Match these to your host user if you're on Linux and hitting file-ownership mismatches on files created inside the container.

Change the PHP-CLI version

The PHP-CLI lives in the Workspace container and is used only for Artisan and Composer, it does not serve your application code (that's PHP-FPM's job), so changing it is usually optional.

  1. In .env, set PHP_VERSION to the version you want:
    PHP_VERSION=8.1
  2. Rebuild the Workspace:
./laradock rebuild workspace

Install the rdkafka extension

Needed for composer install when your dependencies require Kafka.

  1. In .env, set WORKSPACE_INSTALL_RDKAFKA to true.
  2. Rebuild:
./laradock rebuild workspace

To install rdkafka for the PHP-FPM container instead (the one that actually serves your app), see Install the rdkafka extension on the PHP-FPM guide.

Install the AST extension

AST exposes the abstract syntax tree generated by PHP 7+. It's required by tools such as Phan, a static analyzer. WORKSPACE_INSTALL_AST defaults to true, so it's already installed unless you've turned it off.

  1. In .env, set WORKSPACE_INSTALL_AST to true.
  2. Rebuild:
./laradock rebuild workspace

To pin a specific version, set WORKSPACE_AST_VERSION before rebuilding.

Node.js & NVM

  1. In .env, set WORKSPACE_INSTALL_NODE to true.
  2. Rebuild:
./laradock rebuild workspace

A .npmrc is included in the workspace folder and is copied into the root and laradock users' home directories on build, in case you need global npm config.

Package managers

pnpm

pnpm stores a single copy of each package version on disk and hard-links it into each project's node_modules, saving large amounts of space and speeding up installs. More on the pnpm motivation.

  1. In .env, set both WORKSPACE_INSTALL_NODE and WORKSPACE_INSTALL_PNPM to true.
  2. Rebuild:
./laradock rebuild workspace

Yarn

  1. In .env, set both WORKSPACE_INSTALL_NODE and WORKSPACE_INSTALL_YARN to true.
  2. Rebuild:
./laradock rebuild workspace

npm-check-updates

npm-check-updates upgrades your package.json dependencies to the latest versions.

  1. In .env, make sure WORKSPACE_INSTALL_NODE is true.
  2. Set WORKSPACE_INSTALL_NPM_CHECK_UPDATES_CLI to true.
  3. Rebuild:
./laradock rebuild workspace

Frontend build tool CLIs

Gulp

  1. In .env, set WORKSPACE_INSTALL_NPM_GULP to true.
  2. Rebuild:
./laradock rebuild workspace

Bower

Legacy. Bower is deprecated, prefer npm, Yarn, or pnpm for new projects.

  1. In .env, set WORKSPACE_INSTALL_NPM_BOWER to true.
  2. Rebuild:
./laradock rebuild workspace

Vue CLI

  1. In .env, set WORKSPACE_INSTALL_NPM_VUE_CLI to true.
  2. Optionally change the ports: WORKSPACE_VUE_CLI_SERVE_HOST_PORT (default 8080) and WORKSPACE_VUE_CLI_UI_HOST_PORT (default 8001).
  3. Rebuild:
./laradock rebuild workspace

Run vue serve or vue ui from the Workspace, then browse to the matching port.

Angular CLI

  1. In .env, set WORKSPACE_INSTALL_NPM_ANGULAR_CLI to true.
  2. Rebuild:
./laradock rebuild workspace

Composer extras

Global Composer install

Install your global Composer requirements at build time so they're available in the container afterward.

  1. In .env, set WORKSPACE_COMPOSER_GLOBAL_INSTALL to true.
  2. Add your dependencies to workspace/composer.json.
  3. Rebuild:
./laradock rebuild workspace

Prestissimo

Legacy. Prestissimo parallelized downloads for Composer 1 only and is abandoned. Composer 2 (Laradock's default) already downloads in parallel, so you almost certainly don't need this.

  1. Enable Global Composer install (steps 1-2 above).
  2. Add "hirak/prestissimo": "^0.3" to workspace/composer.json.
  3. Rebuild:
./laradock rebuild workspace

Deployment & task runners

Deployer

A deployment tool for PHP.

  1. In .env, set WORKSPACE_INSTALL_DEPLOYER to true.
  2. Rebuild:
./laradock rebuild workspace

See the Deployer documentation.

Laravel Envoy

A task runner.

  1. In .env, set WORKSPACE_INSTALL_LARAVEL_ENVOY to true.
  2. Rebuild:
./laradock rebuild workspace

See the Laravel Envoy documentation.

System utilities

Linuxbrew

Linuxbrew is the Linux port of Homebrew.

  1. In .env, set WORKSPACE_INSTALL_LINUXBREW to true.
  2. Rebuild:
./laradock rebuild workspace

Supervisor

Supervisor monitors and controls long-running processes on UNIX-like systems.

  1. In .env, set both WORKSPACE_INSTALL_SUPERVISOR and WORKSPACE_INSTALL_PYTHON to true.
  2. Create a worker config in php-worker/supervisord.d/ by copying laravel-worker.conf.example.
  3. Rebuild:
./laradock rebuild workspace

GNU Parallel

GNU Parallel runs multiple processes concurrently from the command line.

  1. In .env, set WORKSPACE_INSTALL_GNU_PARALLEL to true.
  2. Rebuild:
./laradock rebuild workspace

dnsutils

  1. In .env, set both flags to true:
    • WORKSPACE_INSTALL_DNSUTILS
    • PHP_FPM_INSTALL_DNSUTILS
  2. Rebuild:
./laradock rebuild workspace php-fpm

Media & document tools

FFmpeg

  1. In .env, set WORKSPACE_INSTALL_FFMPEG to true.
  2. Rebuild:
./laradock rebuild workspace
warning

If you queue conversions, also install FFmpeg in the php-worker and php-fpm containers (same flag pattern), otherwise the php-ffmpeg binary errors out.

BBC audiowaveform

audiowaveform generates waveform data from MP3, WAV, FLAC, or Ogg Vorbis files, for rendering visual waveforms.

  1. In .env, set WORKSPACE_INSTALL_AUDIOWAVEFORM to true.
  2. Rebuild:
./laradock rebuild workspace
warning

If you queue processing, also install it in the php-worker, laravel-horizon, and php-fpm containers (same flag pattern), otherwise the audiowaveform binary errors out.

wkhtmltopdf

wkhtmltopdf renders a PDF from HTML.

  1. In .env, set WORKSPACE_INSTALL_WKHTMLTOPDF to true.
  2. Rebuild:
./laradock rebuild workspace
warning

Also install it in the php-fpm container (same flag pattern), otherwise the wkhtmltopdf binary errors out.

poppler-utils & antiword

poppler-utils is a set of PDF command-line tools (info, text/image extraction, format conversion, signature verification, and more). It's commonly paired with antiword, so Laradock installs both together when the flag is set.

  1. In .env, set the flag to true for each container you need it in: WORKSPACE_INSTALL_POPPLER_UTILS, PHP_FPM_INSTALL_POPPLER_UTILS, PHP_WORKER_INSTALL_POPPLER_UTILS, LARAVEL_HORIZON_INSTALL_POPPLER_UTILS.
  2. Rebuild the affected containers:
./laradock rebuild workspace php-fpm php-worker laravel-horizon

Graphviz

Graphviz renders graphs from text descriptions. Enable it in whichever container needs it:

ContainerFlagRebuild
WorkspaceWORKSPACE_INSTALL_GRAPHVIZ./laradock rebuild workspace
PHP-FPM (most common)PHP_FPM_INSTALL_GRAPHVIZ./laradock rebuild php-fpm
PHP-WorkerPHP_WORKER_INSTALL_GRAPHVIZ./laradock rebuild php-worker

Set the flag to true, then rebuild.

GitHub Copilot CLI

Requires GitHub Copilot access.

  1. In .env, set WORKSPACE_INSTALL_GITHUB_CLI to true.
  2. Rebuild the Workspace:
./laradock rebuild workspace
  1. Enter the Workspace:
./laradock workspace

(The CLI shortcut starts workspace for you first if it isn't already running; with plain Docker Compose, run docker compose up -d workspace first if needed.)

  1. Authenticate, then install the Copilot extension:
    gh auth login
    gh extension install github/gh-copilot

Shell & terminal

Oh My Zsh

Oh My Zsh manages your Zsh configuration. Laradock wires it up with the Laravel autocomplete plugin.

  1. In .env, set SHELL_OH_MY_ZSH to true.
  2. Rebuild:
./laradock rebuild workspace
  1. Use it: enter the Workspace (./laradock workspace, or docker compose exec --user=laradock workspace bash), then run zsh.

Configure it by editing /home/laradock/.zshrc in the running container.

Optional plugins:

  • Autosuggestions: set SHELL_OH_MY_ZSH_AUTOSUGESTIONS to true, then rebuild. Suggests commands as you type, from history and completions (zsh-autosuggestions).
  • Bash aliases: set SHELL_OH_MY_ZSH_ALIASES to true, then rebuild, to load Laradock's aliases.sh into Zsh.

Git Bash prompt

A bash prompt showing the current branch, diff with remote, and counts of staged/changed files.

  1. In .env, set WORKSPACE_INSTALL_GIT_PROMPT to true.
  2. Rebuild:
./laradock rebuild workspace

Customize it by editing workspace/gitprompt.sh and rebuilding. See the bash-git-prompt repo.

Terminal aliases

On startup, Laradock copies workspace/aliases.sh into the container and sources it from ~/.bashrc. Edit that file to add your own aliases or function macros.

Powerline

  1. In .env, set both WORKSPACE_INSTALL_POWERLINE and WORKSPACE_INSTALL_PYTHON to true (Powerline requires Python).
  2. Rebuild:
./laradock rebuild workspace

Run a one-off command without entering the shell

For a single command (a CI-style composer install, an Artisan call from a script, etc.) you don't need an interactive session at all:

docker compose exec workspace composer install
docker compose exec -u laradock workspace php artisan migrate

There's no dedicated ./laradock shortcut for this (only for opening an interactive shell), plain docker compose exec is already the simplest form.

SSH into the Workspace

Useful for pointing an IDE's remote interpreter (PhpStorm, VS Code Remote-SSH) or a deploy tool at the container over SSH instead of Docker's own exec.

  1. In .env, set WORKSPACE_INSTALL_WORKSPACE_SSH to true.
  2. Rebuild:
./laradock rebuild workspace
  1. Connect to localhost on WORKSPACE_SSH_PORT (2222 by default) as root, using the bundled workspace/insecure_id_rsa key:
ssh -p 2222 -i workspace/insecure_id_rsa root@localhost

That key is called "insecure" for a reason, it ships in the repo and is the same for every Laradock install. Fine for a purely local dev container reachable only from your own machine; if the port is ever exposed beyond localhost (a shared dev server, a cloud sandbox), replace workspace/insecure_id_rsa/.pub with your own key pair before rebuilding, or don't enable SSH access at all and use ./laradock workspace/docker compose exec instead.

Docker CLI inside the Workspace (Docker-in-Docker)

workspace can run docker/docker compose commands of its own, wired to a sibling docker-in-docker container (docker:29-dind) rather than your host's Docker socket. This is what lets tools like Testcontainers or Sail-style build scripts work from inside the Workspace.

  1. In .env, set WORKSPACE_INSTALL_DOCKER_CLIENT to true.
  2. Rebuild:
./laradock rebuild workspace

DOCKER_HOST, DOCKER_TLS_VERIFY, and DOCKER_CERT_PATH are already set on the container's environment (see workspace/compose.yml), so once you're inside (./laradock workspace), docker ps/docker build/docker compose ... just work against the docker-in-docker sibling, completely isolated from your host's Docker.

Private Composer packages (auth.json)

If composer install needs credentials for a private registry (private Packagist, a private Satis, Magento's repo.magento.com, etc.):

  1. Set WORKSPACE_COMPOSER_AUTH_JSON to true in .env.
  2. Put your real credentials in workspace/auth.json (Composer's standard auth.json format), the file already exists as a placeholder in that folder.
  3. Rebuild:
./laradock rebuild workspace

workspace/auth.json holds real credentials once you fill it in, don't commit it to your app's repo.

Common issues

  • A tool you enabled isn't there. WORKSPACE_INSTALL_* flags only take effect on build, not on a plain restart: ./laradock rebuild workspace then ./laradock start workspace.
  • Files created in the container are owned by the wrong user on your host. Set WORKSPACE_PUID/WORKSPACE_PGID to match your host user's id -u/id -g, then rebuild.
  • Composer/npm installs are painfully slow. Set WORKSPACE_COMPOSER_REPO_PACKAGIST or WORKSPACE_NPM_REGISTRY to a closer mirror, or CHANGE_SOURCE=true if you're behind the Great Firewall (switches apt sources to a Tsinghua mirror).
  • Xdebug and Blackfire both enabled, neither works right. They can't coexist in the same PHP process, the build skips the Blackfire probe entirely when WORKSPACE_INSTALL_XDEBUG=true.

Need the container that actually runs your PHP app? See the PHP-FPM guide. New to Laradock? Start at Getting Started.