参考
环境变量
设置: docker run -e VARIABLE=VALUE ...
web:environment:- DEBUG=1
常用命令
参考: https://docs.docker.com/compose/reference/overview/
Define and run multi-container applications with Docker.Usage:docker-compose [-f <arg>...] [options] [COMMAND] [ARGS...]docker-compose -h|--helpOptions:-f, --file FILE Specify an alternate compose file(default: docker-compose.yml)-p, --project-name NAME Specify an alternate project name(default: directory name)--verbose Show more output--log-level LEVEL Set log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)--no-ansi Do not print ANSI control characters-v, --version Print version and exit-H, --host HOST Daemon socket to connect to--tls Use TLS; implied by --tlsverify--tlscacert CA_PATH Trust certs signed only by this CA--tlscert CLIENT_CERT_PATH Path to TLS certificate file--tlskey TLS_KEY_PATH Path to TLS key file--tlsverify Use TLS and verify the remote--skip-hostname-check Don't check the daemon's hostname against thename specified in the client certificate--project-directory PATH Specify an alternate working directory(default: the path of the Compose file)--compatibility If set, Compose will attempt to convert deploykeys in v3 files to their non-Swarm equivalentCommands:build Build or rebuild servicesbundle Generate a Docker bundle from the Compose fileconfig Validate and view the Compose filecreate Create servicesdown Stop and remove containers, networks, images, and volumesevents Receive real time events from containersexec Execute a command in a running containerhelp Get help on a commandimages List imageskill Kill containerslogs View output from containerspause Pause servicesport Print the public port for a port bindingps List containerspull Pull service imagespush Push service imagesrestart Restart servicesrm Remove stopped containersrun Run a one-off commandscale Set number of containers for a servicestart Start servicesstop Stop servicestop Display the running processesunpause Unpause servicesup Create and start containersversion Show the Docker-Compose version information
