Docker commands¶

Note

It is beyond the scope of this documentation to provide a completereference for Docker-related commands. This page is concerned only withproviding basic reference for these commands in the context of Divio Cloudprojects.

The docker-compose command¶

Docker Compose, invoked as docker-compose, is used to manage Dockerapplications.

The command is executed in a Docker application directory, and makes use of theproject’s The docker-compose.yml file file. Its general form is:

  1. docker-compose <command>
build
Builds the services (i.e. containers) listed in the docker-compose.ymlfile. Optionally, takes the name of a particular service to build as anargument.
rm
Removes (i.e. deletes) the project and its containers.

The docker command¶

The docker command is used to manage images and containers.

Usage:

  1. docker <command>
ps

List running Docker containers. Example:



  1. docker ps
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAME
    d6007edbaf32 demoprojectweb "/tini -g — pytho…" 17 minutes ago Up 8 seconds 0.0.0.0:8000->80/tcp demoproject_web
    27ff3e661027 postgres:9.4 "docker-entrypoint…" 6 days ago Up 8 seconds 5432/tcp demoprojectdb



原文: http://docs.divio.com/en/latest/reference/docker-commands.html