mirror of
https://github.com/danbulant/docker-compose
synced 2026-06-17 05:31:04 +00:00
Merge pull request #30 from PDMLab/task/9
fix typos and improve wording in docs
This commit is contained in:
commit
7661e43224
2 changed files with 14 additions and 14 deletions
4
index.js
4
index.js
|
|
@ -143,7 +143,7 @@ const rm = function (options) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute command in a running container
|
* Execute command in a running container
|
||||||
* @param {string} contaier container name
|
* @param {string} container container name
|
||||||
* @param {string} command command to execute
|
* @param {string} command command to execute
|
||||||
* @param {object} options
|
* @param {object} options
|
||||||
* @param {string} options.cwd
|
* @param {string} options.cwd
|
||||||
|
|
@ -161,7 +161,7 @@ const exec = function (container, command, options) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run command
|
* Run command
|
||||||
* @param {string} contaier container name
|
* @param {string} container container name
|
||||||
* @param {string} command command to execute
|
* @param {string} command command to execute
|
||||||
* @param {object} options
|
* @param {object} options
|
||||||
* @param {string} options.cwd
|
* @param {string} options.cwd
|
||||||
|
|
|
||||||
24
readme.md
24
readme.md
|
|
@ -12,18 +12,18 @@ npm install --save-dev docker-compose
|
||||||
|
|
||||||
`docker-compose` current supports these commands:
|
`docker-compose` current supports these commands:
|
||||||
|
|
||||||
* `upAll(options)` - Create and start containers - always uses the `-d` flag due to non interactive mode
|
* `upAll(options)` - Builds, (re)creates, starts, and attaches to containers for all services - always uses the `-d` flag due to non interactive mode
|
||||||
* `upMany(services, options)` - Create and start containers specified in `services` - always uses the `-d` flag due to non interactive mode
|
* `upMany(services, options)` - Builds, (re)creates, starts, and attaches to containers for the services specified in `services` - always uses the `-d` flag due to non interactive mode
|
||||||
* `upOne(service, options)` - Create and start container specified in `service` - always uses the `-d` flag due to non interactive mode
|
* `upOne(service, options)` - Builds, (re)creates, starts, and attaches to containers for a service specified in `service` - always uses the `-d` flag due to non interactive mode
|
||||||
* `down(options)` - Stop and remove containers, networks, images, and volumes
|
* `down(options)` - Stops containers and removes containers, networks, volumes, and images created by `up`
|
||||||
* `kill(options)` - Kill containers
|
* `kill(options)` - Force stop service containers
|
||||||
* `stop(options)` - Stop services
|
* `stop(options)` - Stop running containers without removing them
|
||||||
* `rm(options)` - Remove stopped containers - always uses the `-f` flag due to non interactive mode
|
* `rm(options)` - Remove stopped service containers - always uses the `-f` flag due to non interactive mode
|
||||||
* `exec(container, command, options)` - Exec `command` inside `container`, uses `-T` to properly handle stdin & stdout
|
* `exec(container, command, options)` - Exec `command` inside `container`, uses `-T` to properly handle stdin & stdout
|
||||||
* `run(container, command, options)` - Run `command` inside `container`, uses `-T` to properly handle stdin & stdout
|
* `run(service, command, options)` - Run a one-off `command` on a service, uses `-T` to properly handle stdin & stdout
|
||||||
* `buildAll(options)` - Build all images
|
* `buildAll(options)` - Build or rebuild services
|
||||||
* `buildMany(services, options)` - Build images of specified services
|
* `buildMany(services, options)` - Build or rebuild services
|
||||||
* `buildOne(service, options)` - Build image of specified service
|
* `buildOne(service, options)` - Build or rebuild service
|
||||||
|
|
||||||
All commands return a `Promise({object})` with an stdout and stderr strings
|
All commands return a `Promise({object})` with an stdout and stderr strings
|
||||||
```javascript
|
```javascript
|
||||||
|
|
@ -35,7 +35,7 @@ All commands return a `Promise({object})` with an stdout and stderr strings
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
To start containers based on the `docker-compose.yml` file in your current directory, just call `compose.up` like this:
|
To start service containers based on the `docker-compose.yml` file in your current directory, just call `compose.up` like this:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
compose.upAll({ cwd: path.join(__dirname), log: true })
|
compose.upAll({ cwd: path.join(__dirname), log: true })
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue