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
| Command | What it does |
|---|---|
dock login | Sign in through your browser |
dock logout | Sign this computer out |
dock whoami | Show who you're signed in as |
Projects
| Command | What it does |
|---|---|
dock projects | List your projects (alias: dock ls) |
dock init | Set 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 unlink | Forget this folder's project |
dock status | The linked project's state and latest deployment |
dock deploy | Upload this folder and deploy it, following the build |
dock deploy --yes | Deploy without questions |
dock deploy --new | Make a new project for this folder |
dock logs | Your app's output |
dock logs --follow | Keep streaming new output |
dock logs --build | The latest build's log |
Variables
| Command | What it does |
|---|---|
dock env | List the variables' names (never their values) |
dock env set KEY=VALUE … | Set one or more variables |
dock env set KEY | Set 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_SECRETVariable changes apply at the next deploy.
Databases
| Command | What it does |
|---|---|
dock db | List your databases |
dock db sql <database> "<query>" | Run a query and print the result |
Other
| Command | What it does |
|---|---|
dock update | Install the latest dock |
dock update --check | Only say whether there's a newer one |
dock version | Print dock's version |
dock help | The list of commands |
Files and environment
.dock/project.jsonin 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/dockon Linux,~/Library/Application Support/dockon macOS,%AppData%\dockon Windows).
