Add documentation for new resin build and resin deploy commands

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
This commit is contained in:
Cameron Diver 2017-04-26 13:34:40 +01:00
parent 04c2333a54
commit 39b171fd2a
No known key found for this signature in database
GPG Key ID: E76D7ACBEE436E12
3 changed files with 135 additions and 3 deletions

View File

@ -97,6 +97,13 @@
"files": [
"lib/actions/local/index.coffee"
]
},
{
"title": "Deploy",
"files": [
"lib/actions/build.coffee",
"lib/actions/deploy.coffee"
]
}
]
}

View File

@ -120,6 +120,11 @@ Now you have access to all the commands referenced below.
- [local push [deviceIp]](#local-push-deviceip-)
- [local stop [deviceIp]](#local-stop-deviceip-)
- Deploy
- [build [source]](#build-source-)
- [deploy &#60;appName&#62; [image]](#deploy-60-appname-62-image-)
# Application
## app create &#60;name&#62;
@ -1255,3 +1260,123 @@ stop all containers
name of container to stop
# Deploy
## build [source]
Use this command to build a container with a provided docker daemon.
You must provide either an application or a device-type/architecture
pair to use the resin Dockerfile pre-processor
(e.g. Dockerfile.template -> Dockerfile).
Examples:
$ resin build
$ resin build ./source/
$ resin build --deviceType raspberrypi3 --arch armhf
$ resin build --application MyApp ./source/
$ resin build --docker '/var/run/docker.sock'
$ resin build --dockerHost my.docker.host --dockerPort 2376 --ca ca.pem --key key.pem --cert cert.pem
### Options
#### --arch, -A &#60;arch&#62;
The architecture to build for
#### --devicetype, -d &#60;deviceType&#62;
The type of device this build is for
#### --application, -a &#60;application&#62;
The target resin.io application this build is for
#### --docker, -P &#60;docker&#62;
Path to a local docker socket
#### --dockerHost, -h &#60;dockerHost&#62;
The address of the host containing the docker daemon
#### --dockerPort, -p &#60;dockerPort&#62;
The port on which the host docker daemon is listening
#### --ca &#60;ca&#62;
Docker host TLS certificate authority file
#### --cert &#60;cert&#62;
Docker host TLS certificate file
#### --key &#60;key&#62;
Docker host TLS key file
#### --tag, -t &#60;tag&#62;
The alias to the generated image
#### --nocache
Don't use docker layer caching when building
## deploy &#60;appName&#62; [image]
Use this command to deploy and optionally build an image to an application.
Usage: deploy <appName> ([image] | --build [--source build-dir])
Note: If building with this command, all options supported by `resin build`
are also supported with this command.
Examples:
$ resin deploy myApp --build --source myBuildDir/
$ resin deploy myApp myApp/myImage
### Options
#### --build, -b
Build image then deploy
#### --source, -s &#60;source&#62;
The source directory to use when building the image
#### --docker, -P &#60;docker&#62;
Path to a local docker socket
#### --dockerHost, -h &#60;dockerHost&#62;
The address of the host containing the docker daemon
#### --dockerPort, -p &#60;dockerPort&#62;
The port on which the host docker daemon is listening
#### --ca &#60;ca&#62;
Docker host TLS certificate authority file
#### --cert &#60;cert&#62;
Docker host TLS certificate file
#### --key &#60;key&#62;
Docker host TLS key file
#### --tag, -t &#60;tag&#62;
The alias to the generated image
#### --nocache
Don't use docker layer caching when building

View File

@ -96,11 +96,11 @@ module.exports =
Usage: deploy <appName> ([image] | --build [--source build-dir])
Note: If building with this command, all options supported by `resin build`
are also support with this command.
are also supported with this command.
Examples:
$ resin deploy myApp --build --source myBuildDir/
$ resin deploy myApp myApp/myImage
$ resin deploy myApp --build --source myBuildDir/
$ resin deploy myApp myApp/myImage
'''
permission: 'user'
options: dockerUtils.appendOptions [