Merge pull request #499 from resin-io/add-local-build-docs

Add documentation for new resin build and resin deploy commands
This commit is contained in:
CameronDiver 2017-04-26 14:15:34 +01:00 committed by GitHub
commit ebfd842ae5
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 <appName> [image]](#deploy-60-appname-62-image-)
# Application
## app create <name>
@ -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 <arch>
The architecture to build for
#### --devicetype, -d <deviceType>
The type of device this build is for
#### --application, -a <application>
The target resin.io application this build is for
#### --docker, -P <docker>
Path to a local docker socket
#### --dockerHost, -h <dockerHost>
The address of the host containing the docker daemon
#### --dockerPort, -p <dockerPort>
The port on which the host docker daemon is listening
#### --ca <ca>
Docker host TLS certificate authority file
#### --cert <cert>
Docker host TLS certificate file
#### --key <key>
Docker host TLS key file
#### --tag, -t <tag>
The alias to the generated image
#### --nocache
Don't use docker layer caching when building
## deploy <appName> [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 [