Merge pull request #1059 from usha-mandya/assemble-docs-1003

Added assemble CLI reference, updated toc, fixed broken links
This commit is contained in:
Usha Mandya 2019-05-02 14:02:27 +01:00 committed by GitHub
commit 49a90ef0fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 150 additions and 18 deletions

View File

@ -3064,6 +3064,8 @@ manuals:
title: Images
- path: /assemble/adv-backend-manage/
title: Advanced Backend Management
- path: /assemble/cli-reference/
title: CLI reference
- sectiontitle: Docker App
section:
- path: /app/working-with-app/

View File

@ -1,6 +1,6 @@
---
title: Advanced Backend Management
description: Advanced Backend Management for Docker Assemble
title: Advanced backend management
description: Advanced backend management for Docker Assemble
keywords: Backend, Assemble, Docker Enterprise, plugin, Spring Boot, .NET, c#, F#
---
@ -39,7 +39,7 @@ ID: 2f03e7d288e6bea770a2acba4c8c918732aefcd1946c94c918e8a54792e4540f (running)
Image: docker/assemble-backend@sha256:«…»
Sidecar containers:
- 0f339c0cc8d7 docker-assemble-backend-auser-proxy-port-5000 (running)
- 0f339c0cc8d7 docker-assemble-backend-username-proxy-port-5000 (running)
Found 1 worker(s):
@ -79,10 +79,10 @@ Alternatively you can specify a named docker volume to use for the cache. For ex
```
~$ docker volume create $USER-assemble-cache
auser-assemble-cache
~$ docker assemble backend start --cache-volume=auser-assemble-cache
username-assemble-cache
~$ docker assemble backend start --cache-volume=username-assemble-cache
Pulling image «…»: Success
Started container "docker-assemble-backend-auser" (74476d3fdea7)
Started container "docker-assemble-backend-username" (74476d3fdea7)
```
For information regarding the current cache contents, run the command `docker assemble backend cache`.

134
assemble/cli-reference.md Normal file
View File

@ -0,0 +1,134 @@
---
title: Docker Assemble CLI reference
description: Docker Assemble CLI reference
keywords: Docker, assemble, Spring Boot, ASP .NET, backend
---
This page provides information about the `docker assemble` command.
## Overview
Docker Assemble (`docker assemble`) is a CLI plugin which provides a language and framework-aware tool that enables users to build an application into an optimized Docker container.
For more information about Docker Assemble, see [Docker Assemble](/assemble/install/).
## `docker assemble` commands
To view the commands and sub-commands available in `docker assemble`, run:
`docker assemble --help`
```
Usage: docker assemble [OPTIONS] COMMAND
assemble is a high-level build tool
Options:
--addr string backend address (default
"docker-container://docker-assemble-backend-Usha-Mandya")
Management Commands:
backend Manage build backend service
Commands:
build Build a project into a container
version Print the version number of docker assemble
Run 'docker assemble COMMAND --help' for more information on a command.
```
### backend
The `docker assemble backend` command allows you to manage and build backend services. Docker Assemble requires its own buildkit instance to be running in a Docker container on the local system.
```
Usage: docker assemble backend [OPTIONS] COMMAND
Manage build backend service
Options:
--addr string backend address (default
"docker-container://docker-assemble-backend-username")
Management Commands:
cache Manage build cache
Commands:
info Print information about build backend service
logs Show logs for build backend service
start Start build backend service
stop Stop build backend service
Run 'docker assemble backend COMMAND --help' for more information on a command.
```
For example:
```
docker assemble backend start
Pulling image «…»: Success
Started backend container "docker-assemble-backend-username" (3e627bb365a4)
```
For more information about `backend`, see [Advanced backend management](/assemble/adv-backend-manage).
### build
The `docker assemble build` command enables you to build a project into a container.
```
Usage: docker assemble build [PATH]
Build a project into a container
Options:
--addr string backend address (default
"docker-container://docker-assemble-backend-username")
--label KEY=VALUE label to write into the image as KEY=VALUE
--name NAME build image with repository NAME (default
taken from project metadata)
--namespace NAMESPACE build image within repository NAMESPACE
(default no namespace)
-o, --option OPTION=VALUE set an option as OPTION=VALUE
--port stringArray port to expose from container
--progress string set type of progress (auto, plain, tty).
Use plain to show container output (default
"auto")
--push push result to registry, not local image store
--push-insecure push result to insecure (http) registry,
not local image store
--tag TAG tag image with TAG (default taken from
project metadata or "latest")
```
For example:
```
~$ docker assemble build docker-springframework
«…»
Successfully built: docker.io/library/hello-boot:1
```
## version
The `docker assemble version` command displays the version number of Docker Assemble.
```
Usage: docker assemble version
Print the version number of docker assemble
Options:
--addr string backend address (default
"docker-container://docker-assemble-backend-username")
```
For example:
```
> docker assemble version
docker assemble v0.31.0
commit: d089e2be00b0f7d7f565aeba11cb8bc6dd56a40b
buildkit: 2bd8e6cb2b42
os/arch: windows/amd64
```

View File

@ -12,7 +12,7 @@ The `docker-assemble.yaml` file is in YAML syntax and has the following informal
- `image`: (_map_) contains options related to the output image.
- `platforms`: (_list of strings_) lists the possible platforms which can be built (for example, `linux/amd64`, `windows/amd64`). The default is determined automatically from the project type and content. Note that by default Docker Assemble will build only for `linux/amd64` unless `--push` is used. See [Building Multiplatform images](images#multi-platform-images).
- `platforms`: (_list of strings_) lists the possible platforms which can be built (for example, `linux/amd64`, `windows/amd64`). The default is determined automatically from the project type and content. Note that by default Docker Assemble will build only for `linux/amd64` unless `--push` is used. See [Building Multiplatform images](/assemble/images/#multi-platform-images).
- `ports`: (_list of strings_) contains ports to expose from a container running the image. e.g `80/tcp` or `8080`. Default is to automatically determine the set of ports to expose where possible. To disable this and export no ports specify a list containing precisely one element of `none`.
@ -26,7 +26,7 @@ The `docker-assemble.yaml` file is in YAML syntax and has the following informal
- `healthcheck`: (_map_) describes how to check a container running the image is healthy.
- `kind`: (_string_) sets the type of Healthcheck to perform. Valid values are `none`, `simple-tcpport-open` and `springboot`. See [Health checks](/images#healthchecks).
- `kind`: (_string_) sets the type of Healthcheck to perform. Valid values are `none`, `simple-tcpport-open` and `springboot`. See [Health checks](/assemble/images/#health-checks).
- `interval`: (_duration_) the time to wait between checks.
@ -44,7 +44,7 @@ The `docker-assemble.yaml` file is in YAML syntax and has the following informal
- `build-image`: (_string_) sets a custom base build image
- `runtime-images` (_map_) sets a custom base runtime image by platform. For valid keys, refer to the **Spring Boot** section in [Custom base images](/images#custom-base-images).
- `runtime-images` (_map_) sets a custom base runtime image by platform. For valid keys, refer to the **Spring Boot** section in [Custom base images](/assemble/images/#custom-base-images).
- `aspnetcore`: (_map_) if this is an ASP.NET Core project then contains related configuration options.
@ -54,7 +54,7 @@ The `docker-assemble.yaml` file is in YAML syntax and has the following informal
- `build-image`: (_string_) sets a custom base build image
- `runtime-images` (_map_) sets a custom base runtime image by platform. For valid keys, refer to the **ASP.NET Core** section in [Custom base images](/images#custom-base-images).
- `runtime-images` (_map_) sets a custom base runtime image by platform. For valid keys, refer to the **ASP.NET Core** section in [Custom base images](/assemble/images/#custom-base-images).
> **Notes:**
>

View File

@ -4,9 +4,7 @@ description: Building a C# ASP.NET Core project using Docker Assemble
keywords: Assemble, Docker Enterprise, Spring Boot, container image
---
## To build a C# ASP.NET Core project
Ensure you are running the `backend` before you build any projects using Docker Assemble. For instructions on running the backend, see [Install Docker Assemble](/install).
Ensure you are running the `backend` before you build any projects using Docker Assemble. For instructions on running the backend, see [Install Docker Assemble](/assemble/install).
Clone the git repository you would like to use. The following example uses the `dotnetdemo` repository.

View File

@ -27,11 +27,11 @@ To start the backend, run:
```
~$ docker assemble backend start`
Pulling image «…»: Success
Started backend container "docker-assemble-backend-auser" (3e627bb365a4)
Started backend container "docker-assemble-backend-username" (3e627bb365a4)
```
When the backend is running, it can be used for multiple builds and does not need to be restarted.
> **Note:** For instructions on running a remote backend, accessing logs, saving the build cache in a named volume, accessing a host port, and for information about the buildkit instance, see `--help` .
For advanced backend user information, see [Advanced Backend Management](/adv-backend-manage).
For advanced backend user information, see [Advanced Backend Management](/assemble/adv-backend-manage/).

View File

@ -4,9 +4,7 @@ description: Building a Spring Boot project using Docker Assemble
keywords: Assemble, Docker Enterprise, Spring Boot, container image
---
## To build a Spring Boot project
Ensure you are running the `backend` before you build any projects using Docker Assemble. For instructions on running the backend, see [Install Docker Assemble](/install).
Ensure you are running the `backend` before you build any projects using Docker Assemble. For instructions on running the backend, see [Install Docker Assemble](/assemble/install).
Clone the git repository you would like to use. The following example uses the `docker-springfamework` repository.