docker cheat sheet▌

The commands people actually use, grouped by what you are trying to do. Click any line to copy it.

Placeholders and conventions

Replace the highlighted placeholders before you run a command:

  • <ct> container name or ID
  • <ct2> a second container
  • <ct_db> the PostgreSQL container
  • <img> image
  • <tag> image tag, such as 19.0
  • <repo> registry or user prefix
  • <stage> stage name in a Dockerfile
  • <vol> volume
  • <vol_new> a second, new volume
  • <network> network
  • <service> compose service (Odoo)
  • <service_db> compose service (PostgreSQL)
  • <project> compose project name
  • <name> compose profile name
  • <cmd> the command to run inside
  • <new> a new name
  • <term> a search term
  • <module> Odoo module (technical name)
  • <db> database name
  • <db_new> name of the new or target database
  • <master_pwd> Odoo master password (admin_passwd)

Commands are written for a bash shell (Linux, macOS, or Git Bash and WSL on Windows). Almost every command accepts --help.

/