Merge pull request #1960 from jhadvig/podex_readme

update Podex README
This commit is contained in:
Johan Euphrosine 2014-11-15 14:27:03 -08:00
commit ccc8bc8289
3 changed files with 16 additions and 4 deletions

View File

@ -8,9 +8,21 @@ Manifests can then be edited by a human to match deployment needs.
## Usage
```
$ docker pull google/nodejs-hello
$ podex -yaml google/nodejs-hello > pod.yaml
$ podex -json google/nodejs-hello > pod.json
$ podex [-json|-yaml] [-id PODNAME] IMAGES...
$ podex -json [-id PODNAME] IMAGES... > pod.json
$ podex -yaml [-id PODNAME] IMAGES... > pod.yaml
```
### Options
- `id`: set the pod name (required with multiple images, optional with single image: default to image base name)
- `json`: puts the container manifest into JSON format
- `yaml`: puts the container manifest into YAML format
### Examples
```
$ podex -json google/nodejs-hello > pod.yaml
$ podex -yaml -id nodejs-nginx google/nodejs-hello nginx > pod.yaml
```
## TODOs

BIN
contrib/podex/podex Executable file

Binary file not shown.

View File

@ -40,7 +40,7 @@ import (
"gopkg.in/v1/yaml"
)
const usage = "usage: podex [-json|-yaml] -id=ID username/image1 ... username/imageN"
const usage = "usage: podex [-json|-yaml] [-id PODNAME] IMAGES"
var generateJSON = flag.Bool("json", false, "generate json manifest")
var generateYAML = flag.Bool("yaml", false, "generate yaml manifest")