docs/tutorials/ask-for-docker-and-ports
Intermediate7 min

Ask for Docker and ports

Compose, free a port, and a named vault hit. Killing a process is on you — Ask only prints.

What you will do

DevOps Asks often come back CAUTION. That is the point: you read the command, then you run it. Recall will not bind Docker or kill a PID for you.

01Start Postgres with Compose

simulated — nothing here is executed.
$ recall "start postgres with docker compose in the background"  docker compose up -d postgres Starts the postgres service from compose.yaml in detached mode.  shell: zsh risk: SAFE source: recall agent ai left this month: 19  alt docker-compose up -d postgres  Ask mode does not run commands. Copy or save this yourself. ? Save this command? Yes? Name (optional): pg-up? Tags (optional): docker,postgres Saved as "pg-up" [docker,postgres].
you run this
docker compose up -d postgres Container myapp-postgres-1 Started

02See what holds port 3000

simulated — nothing here is executed.
$ recall "what process is using port 3000"  lsof -nP -iTCP:3000 -sTCP:LISTEN Lists the process listening on TCP 3000. On Windows, use netstat -ano | findstr :3000.  shell: zsh risk: SAFE source: recall agent ai left this month: 18  alt ss -ltnp | grep 3000  Ask mode does not run commands. Copy or save this yourself. ? Save this command? No

03Free the port (you confirm)

rec — zsh
rec "free the process using port 3000" prints a CAUTION kill. Ask does not run it.
simulated — nothing here is executed.
$ recall "free the process using port 3000"  lsof -tiTCP:3000 -sTCP:LISTEN | xargs kill Sends SIGTERM to whatever is listening on 3000. Confirm the PID before you paste this.  shell: zsh risk: CAUTION source: recall agent ai left this month: 17  Ask mode does not run commands. Copy or save this yourself. ? Save this command? No

Simulated follow-up in your shell — still not recall executing:

you inspect, then you kill
lsof -nP -iTCP:3000 -sTCP:LISTEN COMMAND PID USER node 41221 *:3000 (LISTEN)kill 41221

04Vault hit for last week’s docker command

You already saved pg-up. Ask can return it from your vault:

simulated — nothing here is executed.
$ recall "that docker command from last week"  docker compose up -d postgres From your vault: pg-up.  shell: zsh risk: SAFE source: vault ai left this month: 17  Ask mode does not run commands. Copy or save this yourself. from your vault

Vault hits skip the save prompt. Still print-only until you run recall run pg-up.

// what's next
Next.js start and build Asks Save multi-line deploy scripts as snippets