DockHostingDocs
dock CLI

Command reference

Every dock command and option.

Most commands act on the project linked to the current folder (see dock link). Add --project <name or id> to act on another one.

Account

CommandWhat it does
dock loginSign in through your browser
dock logoutSign this computer out
dock whoamiShow who you're signed in as

Projects

CommandWhat it does
dock projectsList your projects (alias: dock ls)
dock initSet this folder up as a project: the questions of deploy, without uploading
dock link [project]Link this folder to a project (asks which when none is given)
dock unlinkForget this folder's project
dock statusThe linked project's state and latest deployment
dock deployUpload this folder and deploy it, following the build
dock deploy --yesDeploy without questions
dock deploy --newMake a new project for this folder
dock logsYour app's output
dock logs --followKeep streaming new output
dock logs --buildThe latest build's log

Variables

CommandWhat it does
dock envList the variables' names (never their values)
dock env set KEY=VALUE …Set one or more variables
dock env set KEYSet a variable by typing or piping its value, so it stays out of your shell history
dock env unset KEY …Remove variables
echo "$STRIPE_SECRET" | dock env set STRIPE_SECRET

Variable changes apply at the next deploy.

Databases

CommandWhat it does
dock dbList your databases
dock db sql <database> "<query>"Run a query and print the result

Other

CommandWhat it does
dock updateInstall the latest dock
dock update --checkOnly say whether there's a newer one
dock versionPrint dock's version
dock helpThe list of commands

Files and environment

  • .dock/project.json in your folder records the linked project. Commit it if your team shares the folder, or add it to .gitignore.
  • Your sign-in is stored in your user's config folder (~/.config/dock on Linux, ~/Library/Application Support/dock on macOS, %AppData%\dock on Windows).

On this page