Skip to content

Commit

Permalink
Reworked command documentation a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
toote committed Sep 26, 2022
1 parent 9622b0f commit e0357ad
Showing 1 changed file with 39 additions and 3 deletions.
42 changes: 39 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,20 +336,56 @@ are another (with a default name). The first successfully downloaded image in ea

## Configuration

### `build`
### Main Commands

You will need to specify at least one of the following to use this extension.

#### `build`

The name of a service to build and store, allowing following pipeline steps to run faster as they won't need to build the image. The step's `command` will be ignored and does not need to be specified.

Either a single service or multiple services can be provided as an array.

### `run`
#### `run`

The name of the service the command should be run within. If the docker-compose command would usually be `docker-compose run app test.sh` then the value would be `app`.

### `push`
#### `push`

A list of services to push in the format `service:image:tag`. If an image has been pre-built with the build step, that image will be re-tagged, otherwise docker-compose's built-in push operation will be used.

#### Known issues

##### Run & Push

A basic pipeline similar to the following:

```yaml
steps:
- label: ":docker: Run & Push"
plugins:
- docker-compose#v3.12.0:
run: myservice
push: myservice
```
Will cause the image to be built twice (once before running and once before pushing) unless there was a previous `build` step that set the appropriate metadata.

##### Run & Push

A basic pipeline similar to the following:

```yaml
steps:
- label: ":docker: Build & Push"
plugins:
- docker-compose#v3.12.0:
build: myservice
push: myservice
```

Will cause the image to be pushed twice (once by the build step and another by the push step)

### `pull` (optional, run only)

Pull down multiple pre-built images. By default only the service that is being run will be pulled down, but this allows multiple images to be specified to handle prebuilt dependent images.
Expand Down

0 comments on commit e0357ad

Please sign in to comment.