Merge pull request #10507 from usha-mandya/engdocs-346

Product Manuals TOC update
This commit is contained in:
Usha Mandya 2020-03-25 10:22:54 +00:00 committed by GitHub
commit 80f1f1a009
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 8 additions and 2422 deletions

View File

@ -1,23 +0,0 @@
command: docker template
short: Use templates to quickly create new services
long: Use templates to quickly create new services
pname: docker
plink: docker.yaml
cname:
- docker template config
- docker template inspect
- docker template list
- docker template scaffold
- docker template version
clink:
- docker_template_config.yaml
- docker_template_inspect.yaml
- docker_template_list.yaml
- docker_template_scaffold.yaml
- docker_template_version.yaml
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,17 +0,0 @@
command: docker template config
short: Modify docker template configuration
long: Modify docker template configuration
pname: docker template
plink: docker_template.yaml
cname:
- docker template config set
- docker template config view
clink:
- docker_template_config_set.yaml
- docker_template_config_view.yaml
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,48 +0,0 @@
command: docker template config set
short: set default values for docker template
long: set default values for docker template
usage: docker template config set
pname: docker template config
plink: docker_template_config.yaml
options:
- option: feedback
value_type: bool
default_value: "false"
description: |
Send anonymous feedback about usage (performance, failure status, os, version)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: no-feedback
value_type: bool
default_value: "false"
description: Don't send anonymous feedback
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: org
value_type: string
description: Set default organization / docker hub user
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: server
value_type: string
description: Set default registry server (host[:port])
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,22 +0,0 @@
command: docker template config view
short: view default values for docker template
long: view default values for docker template
usage: docker template config view
pname: docker template config
plink: docker_template_config.yaml
options:
- option: format
value_type: string
default_value: yaml
description: Configure the output format (json|yaml)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,22 +0,0 @@
command: docker template inspect
short: Inspect service templates or application templates
long: Inspect service templates or application templates
usage: docker template inspect <service or application>
pname: docker template
plink: docker_template.yaml
options:
- option: format
value_type: string
default_value: pretty
description: Configure the output format (pretty|json|yaml)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,32 +0,0 @@
command: docker template list
aliases: ls
short: List available templates with their informations
long: List available templates with their informations
usage: docker template list
pname: docker template
plink: docker_template.yaml
options:
- option: format
value_type: string
default_value: pretty
description: Configure the output format (pretty|json|yaml)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: type
value_type: string
default_value: all
description: Filter by type (application|service|all)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,70 +0,0 @@
command: docker template scaffold
short: Choose an application template or service template(s) and scaffold a new project
long: Choose an application template or service template(s) and scaffold a new project
usage: docker template scaffold application [<alias=service>...] OR scaffold [alias=]service
[<[alias=]service>...]
pname: docker template
plink: docker_template.yaml
options:
- option: name
value_type: string
description: Application name
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: org
value_type: string
description: |
Deploy to a specific organization / docker hub user (if not specified, it will use your current hub login)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: path
value_type: string
description: Deploy to a specific path
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: platform
value_type: string
default_value: linux
description: Target platform (linux|windows)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: server
value_type: string
description: Deploy to a specific registry server (host[:port])
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: set
shorthand: s
value_type: stringArray
default_value: '[]'
description: Override parameters values (service.name=value)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
examples: "docker template scaffold react-java-mysql -s back.java=10 -s front.externalPort=80
\ndocker template scaffold react-java-mysql java=back reactjs=front -s reactjs.externalPort=80
\ndocker template scaffold back=spring front=react -s back.externalPort=9000 \ndocker
template scaffold react-java-mysql --server=myregistry:5000 --org=myorg"
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,12 +0,0 @@
command: docker template version
short: Print version information
long: Print version information
usage: docker template version
pname: docker template
plink: docker_template.yaml
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,64 +0,0 @@
command: docker assemble
short: assemble is a high-level build tool
long: assemble is a high-level build tool
pname: docker
plink: docker.yaml
cname:
- docker assemble backend
- docker assemble build
- docker assemble version
clink:
- docker_assemble_backend.yaml
- docker_assemble_build.yaml
- docker_assemble_version.yaml
options:
- option: addr
value_type: string
default_value: docker-container://docker-assemble-backend-root
description: backend address
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: tlscacert
value_type: string
description: |
specify CA certificate to use when validating the backend service's TLS certificate
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: tlscert
value_type: string
description: |
specify client certificate to use when connecting to backend service
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: tlskey
value_type: string
description: specify client key to use when connecting to backend service
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: tlsservername
value_type: string
description: |
override server name for validation of the backend service's TLS certificate
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,35 +0,0 @@
command: docker assemble backend
short: Manage build backend service
long: Manage build backend service
pname: docker assemble
plink: docker_assemble.yaml
cname:
- docker assemble backend cache
- docker assemble backend image
- docker assemble backend info
- docker assemble backend logs
- docker assemble backend start
- docker assemble backend stop
clink:
- docker_assemble_backend_cache.yaml
- docker_assemble_backend_image.yaml
- docker_assemble_backend_info.yaml
- docker_assemble_backend_logs.yaml
- docker_assemble_backend_start.yaml
- docker_assemble_backend_stop.yaml
inherited_options:
- option: addr
value_type: string
default_value: docker-container://docker-assemble-backend-root
description: backend address
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,27 +0,0 @@
command: docker assemble backend cache
short: Manage build cache
long: Manage build cache
pname: docker assemble backend
plink: docker_assemble_backend.yaml
cname:
- docker assemble backend cache purge
- docker assemble backend cache usage
clink:
- docker_assemble_backend_cache_purge.yaml
- docker_assemble_backend_cache_usage.yaml
inherited_options:
- option: addr
value_type: string
default_value: docker-container://docker-assemble-backend-root
description: backend address
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,22 +0,0 @@
command: docker assemble backend cache purge
short: Purge build cache
long: Purge build cache
usage: docker assemble backend cache purge
pname: docker assemble backend cache
plink: docker_assemble_backend_cache.yaml
inherited_options:
- option: addr
value_type: string
default_value: docker-container://docker-assemble-backend-root
description: backend address
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,22 +0,0 @@
command: docker assemble backend cache usage
short: Show build cache contents
long: Show build cache contents
usage: docker assemble backend cache usage
pname: docker assemble backend cache
plink: docker_assemble_backend_cache.yaml
inherited_options:
- option: addr
value_type: string
default_value: docker-container://docker-assemble-backend-root
description: backend address
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,31 +0,0 @@
command: docker assemble backend image
short: Print image to be used as backend
long: |-
Print image to be used as backend.
This can be useful to do:
docker save -o assemble-backend.tar $(docker assemble backend image)
In order to transport "assemble-backend.tar" to an offline system and:
docker load < assemble-backend.tar
usage: docker assemble backend image
pname: docker assemble backend
plink: docker_assemble_backend.yaml
inherited_options:
- option: addr
value_type: string
default_value: docker-container://docker-assemble-backend-root
description: backend address
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,22 +0,0 @@
command: docker assemble backend info
short: Print information about build backend service
long: Print information about build backend service
usage: docker assemble backend info
pname: docker assemble backend
plink: docker_assemble_backend.yaml
inherited_options:
- option: addr
value_type: string
default_value: docker-container://docker-assemble-backend-root
description: backend address
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,32 +0,0 @@
command: docker assemble backend logs
short: Show logs for build backend service
long: Show logs for build backend service
usage: docker assemble backend logs
pname: docker assemble backend
plink: docker_assemble_backend.yaml
options:
- option: follow
value_type: bool
default_value: "false"
description: follow log output
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
inherited_options:
- option: addr
value_type: string
default_value: docker-container://docker-assemble-backend-root
description: backend address
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,60 +0,0 @@
command: docker assemble backend start
short: Start build backend service
long: Start build backend service
usage: docker assemble backend start
pname: docker assemble backend
plink: docker_assemble_backend.yaml
options:
- option: allow-host-port
value_type: uintSlice
default_value: '[5000]'
description: |
allow the backend to access a host port by starting a proxy container
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: cache-volume
value_type: string
description: |
named volume to use as build cache (default "docker-assemble-backend-cache-root" if it exists, otherwise an anonymous volume)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: host-port
value_type: uint16
default_value: "0"
description: host port to expose build service (0 is a random port)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: image
value_type: string
default_value: scratch
description: image to use
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
inherited_options:
- option: addr
value_type: string
default_value: docker-container://docker-assemble-backend-root
description: backend address
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,32 +0,0 @@
command: docker assemble backend stop
short: Stop build backend service
long: Stop build backend service
usage: docker assemble backend stop
pname: docker assemble backend
plink: docker_assemble_backend.yaml
options:
- option: keep
value_type: bool
default_value: "false"
description: stop but don't destroy the container
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
inherited_options:
- option: addr
value_type: string
default_value: docker-container://docker-assemble-backend-root
description: backend address
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,150 +0,0 @@
command: docker assemble build
short: Build a project into a container
long: Build a project into a container
usage: docker assemble build [PATH]
pname: docker assemble
plink: docker_assemble.yaml
options:
- option: debug-dump-config
value_type: string
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: debug-dump-image
value_type: string
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: debug-dump-llb
value_type: string
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: debug-skip-build
value_type: bool
default_value: "false"
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: frontend
value_type: string
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: frontend-devel
value_type: string
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: label
value_type: stringArray
default_value: '[]'
description: label to write into the image as `KEY=VALUE`
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: name
value_type: string
description: |
build image with repository `NAME` (default taken from project metadata)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: namespace
value_type: string
description: |
build image within repository `NAMESPACE` (default no namespace)
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: option
shorthand: o
value_type: stringArray
default_value: '[]'
description: set an option as `OPTION=VALUE`
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: port
value_type: stringArray
default_value: '[]'
description: port to expose from container
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: progress
value_type: string
default_value: auto
description: |
set type of progress (auto, plain, tty). Use plain to show container output
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: push
value_type: bool
default_value: "false"
description: push result to registry, not local image store
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: push-insecure
value_type: bool
default_value: "false"
description: |
push result to insecure (http) registry, not local image store
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: tag
value_type: string
description: |
tag image with `TAG` (default taken from project metadata or "latest")
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
inherited_options:
- option: addr
value_type: string
default_value: docker-container://docker-assemble-backend-root
description: backend address
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -1,22 +0,0 @@
command: docker assemble version
short: Print the version number of docker assemble
long: Print the version number of docker assemble
usage: docker assemble version
pname: docker assemble
plink: docker_assemble.yaml
inherited_options:
- option: addr
value_type: string
default_value: docker-container://docker-assemble-backend-root
description: backend address
deprecated: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
deprecated: false
experimental: false
experimentalcli: true
kubernetes: false
swarm: false

View File

@ -351,32 +351,6 @@ reference:
title: docker app validate
- path: /engine/reference/commandline/app_version/
title: docker app version
- sectiontitle: docker assemble
section:
- path: /engine/reference/commandline/assemble/
title: docker assemble
- path: /engine/reference/commandline/assemble_backend/
title: docker assemble backend
- path: /engine/reference/commandline/assemble_backend_cache/
title: docker assemble backend cache
- path: /engine/reference/commandline/assemble_backend_cache_purge/
title: docker assemble backend cache purge
- path: /engine/reference/commandline/assemble_backend_cache_usage/
title: docker assemble backend cache usage
- path: /engine/reference/commandline/assemble_backend_image/
title: docker assemble backend image
- path: /engine/reference/commandline/assemble_backend_info/
title: docker assemble backend info
- path: /engine/reference/commandline/assemble_backend_logs/
title: docker assemble backend logs
- path: /engine/reference/commandline/assemble_backend_start/
title: docker assemble backend start
- path: /engine/reference/commandline/assemble_backend_stop/
title: docker assemble backend stop
- path: /engine/reference/commandline/assemble_build/
title: docker assemble build
- path: /engine/reference/commandline/assemble_version/
title: docker assemble version
- path: /engine/reference/commandline/attach/
title: docker attach
- path: /engine/reference/commandline/build/
@ -795,24 +769,6 @@ reference:
title: docker system prune
- path: /engine/reference/commandline/tag/
title: docker tag
- sectiontitle: docker template
section:
- path: /engine/reference/commandline/template/
title: docker template
- path: /engine/reference/commandline/template_config/
title: docker template config
- path: /engine/reference/commandline/template_config_set/
title: docker template config set
- path: /engine/reference/commandline/template_config_view/
title: docker template config view
- path: /engine/reference/commandline/template_inspect/
title: docker template inspect
- path: /engine/reference/commandline/template_list/
title: docker template list
- path: /engine/reference/commandline/template_scaffold/
title: docker template scaffold
- path: /engine/reference/commandline/template_version/
title: docker template version
- path: /engine/reference/commandline/top/
title: docker top
- sectiontitle: docker trust
@ -977,8 +933,6 @@ reference:
title: v1.18 reference
- title: Registry API
path: /registry/spec/api/
- title: Template API
path: /app-template/api-reference/
- title: Dockerfile reference
path: /engine/reference/builder/
- sectiontitle: Compose file reference
@ -1123,25 +1077,12 @@ manuals:
title: Engine 17.03 release notes
- path: /engine/release-notes/prior-releases/
title: Engine 1.13 and earlier
- sectiontitle: Docker Assemble
section:
- path: /assemble/install/
title: Install
- path: /assemble/spring-boot/
title: Build a Spring Boot project
- path: /assemble/dot-net/
title: Build a C# ASP.NET Core project
- path: /assemble/configure/
title: Configure
- path: /assemble/images/
title: Images
- path: /assemble/adv-backend-manage/
title: Advanced Backend Management
- path: /app/working-with-app/
title: Docker App
- path: /buildx/working-with-buildx/
title: Docker Buildx
- path: /app/working-with-app/
title: Docker App
- path: /buildx/working-with-buildx/
title: Docker Buildx
- path: /engine/context/working-with-contexts/
title: Docker Context
- sectiontitle: Docker Compose
section:
- path: /compose/
@ -1170,8 +1111,6 @@ manuals:
title: Sample apps with Compose
- path: /release-notes/docker-compose/
title: Docker Compose release notes
- path: /engine/context/working-with-contexts/
title: Docker Context
- sectiontitle: Docker Desktop for Mac
section:
- path: /docker-for-mac/
@ -1230,12 +1169,12 @@ manuals:
title: Edge release notes
- path: /docker-for-windows/wsl-tech-preview/
title: Docker Desktop WSL 2 backend
- title: Docker ID accounts
path: /docker-id/
- sectiontitle: Docker Hub
section:
- path: /docker-hub/
title: Quickstart
- path: /docker-id/
title: Docker ID accounts
- sectiontitle: Security and authentication
section:
- path: /docker-hub/access-tokens/
@ -1300,8 +1239,6 @@ manuals:
title: Trust chain
- path: /docker-hub/publish/byol/
title: Bring Your Own License (BYOL)
- path: /app-template/working-with-template/
title: Docker Template
- sectiontitle: Open-source projects
section:
- sectiontitle: Notary

View File

@ -1,161 +0,0 @@
---
title: Docker Template API reference
description: Docker Template API reference
keywords: application, template, API, definition
---
This page contains information about the Docker Template API reference.
## Service template definition
The following section provides information about the valid parameters that you can use when you create a service template definition.
```
apiVersion: v1alpha1
kind: ServiceTemplate
metadata:
name: angular
platforms:
- linux
spec:
title: Angular
description: Angular service
icon: https://cdn.worldvectorlogo.com/logos/angular-icon-1.svg
source:
image: docker.io/myorg/myservice:version
parameters:
- name: node
description: Node version
type: enum
defaultValue: "9"
values:
- value: "10"
description: "10"
- value: "9"
description: "9"
- value: "8"
description: "8"
- name: externalPort
description: External port
defaultValue: "8080"
type: hostPort
```
### root
| Parameter |Required? | Description |
| :----------------------|:----------------------|:----------------------------------------|
| apiVersion |yes | The api format version. Current latest is v1alpha1|
|kind| yes|The kind of object. Must be `ServiceTemplate` For services templates.|
### metadata
| Parameter |Required? | Description |
| :----------------------|:----------------------|:----------------------------------------|
|name |yes | The identifier for this service. Must be unique within a given library. |
|platform| yes|A list of allowed target platforms. Possible options are `windows` and `linux`|
### spec
| Parameter |Required? | Description |
| :----------------------|:----------------------|:----------------------------------------|
| title |yes |The label for this service, as displayed when listed in `docker template` commands or in the `application-designer`|
|description| no|A short description for this service|
|icon|no|An icon representing the service. Only used in the Application Designer|
### spec/source
| Parameter |Required? | Description |
| :----------------------|:----------------------|:----------------------------------------|
| image |yes| The name of the image associated with this service template. Must be in full `repo/org/service:version` format|
### spec/parameters
The parameters section allows to specify the input parameters that are going to be used by the service.
| Parameter |Required? | Description |
| :----------------------|:----------------------|:----------------------------------------|
|name |yes| The identifier for this parameter. Must be unique within the service parameters. |
|description| no|A short description of the parameter. Will be used as label in the Application Designer|
|type| yes|The type of the parameter. Possible options are: `string` - The default type, with no validation or specific features. `enum` - Allow the user to choose a value included in a specific list of options. Must specify the values parameter. `hostPort` - Specify that this parameter is a port that is going to be exposed. Use port format regexp validation, and avoid duplicate ports within an application.|
|defaultValue| yes|The default value for this parameter. For enum type, must be a valid value from the values list.|
|values| no|For enum type, specify a list of value with a value/description tuple.|
## Application template definition
The following section provides information about the valid parameters that you can use when you create a application template definition.
```
apiVersion: v1alpha1
kind: ApplicationTemplate
metadata:
name: nginx-flask-mysql
platforms:
- linux
spec:
title: Flask / NGINX / MySQL application
description: Sample Python/Flask application with an Nginx proxy and a MySQL database
services:
- name: back
serviceId: flask
parameters:
externalPort: "80"
- name: db
serviceId: mysql
- name: proxy
serviceId: nginx
```
### root
| Parameter |Required? | Description |
| :----------------------|:----------------------|:----------------------------------------|
| apiVersion |yes | The api format version. Current latest is v1alpha1|
|kind| yes|The kind of object. Must be `ApplicationTemplate` For application templates.|
### metadata
| Parameter |Required? | Description |
| :----------------------|:----------------------|:----------------------------------------|
|name |yes | The identifier for this application template. Must be unique within a given library.|
|platform| yes|A list of allowed target platforms. Possible options are `windows` and `linux`|
### spec
| Parameter |Required? | Description |
| :----------------------|:----------------------|:----------------------------------------|
| title |yes |The label for this application template, as displayed when listed in `docker template` commands or in `application-designer` |
|description| no|A short description for this service|
### spec/services
This section lists the service templates used in the application.
| Parameter |Required? | Description |
| :----------------------|:----------------------|:----------------------------------------|
| name |yes|The name of the service. It will be used for image name and for subfolder within the application structure. |
|serviceId |yes|The id of the service to use (equivalent to the metadata/name field of the service) |
| parameters |no|A map (string to string) that can be used to override the default values of the service parameters.|
## Service configuration file
The file is mounted at `/run/configuration` in every service template container and contains the template context in a JSON format.
| Parameter |Description |
| :----------------------|:----------------------|
|ServiceId |The service id|
| name |The name of the service as specified by the application template or overridden by the user|
|parameters |A map (string to string) containing the services parameter values.|
| targetPath |The destination folder for the application on the host machine.|
|namespace |The service images namespace (org and user)|
|services |A list containing all the services of the application (see below)|
### Attributes
The items in the services list contains the following attributes:
| Parameter |Description |
| :----------------------|:----------------------|
|serviceId |The service id|
| name |The name of the service as specified by the application template or overridden by the user|
| parameters |A map (string to string) containing the services parameter values.|

View File

@ -1,528 +0,0 @@
---
title: Docker Template
description: Working with Docker Template
keywords: Docker, application template, Application Designer,
---
>This is an experimental feature.
>
>{% include experimental.md %}
## Overview
Docker Template is a CLI plugin that introduces a top-level `docker template`
command that allows users to create new Docker applications by using a library
of templates. There are two types of templates — service templates and
application templates.
A _service template_ is a container image that generates code and contains the
metadata associated with the image.
- The container image takes `/run/configuration` mounted file as input to
generate assets such as code, Dockerfile, and `docker-compose.yaml` for a
given service, and writes the output to the `/project` mounted folder.
- The metadata file that describes the service template is called the service
definition. It contains the name of the service, description, and available
parameters such as ports, volumes, etc. For a complete list of parameters that
are allowed, see [Docker Template API
reference](/app-template/api-reference/).
An _application template_ is a collection of one or more service templates. An
application template generates a Dockerfile per service and only one Compose
file for the entire application, aggregating all services.
## Create a custom service template
A Docker template contains a predefined set of service and application
templates. To create a custom template based on your requirements, you must
complete the following steps:
1. Create a service container image
2. Create the service template definition
3. Add the service template to the library
4. Share the service template
### Create a service container image
A service template provides the description required by Docker Template to
scaffold a project. A service template runs inside a container with two bind
mounts:
1. `/run/configuration`, a JSON file which contains all settings such as
parameters, image name, etc. For example:
```json
{
"parameters": {
"externalPort": "80",
"artifactId": "com.company.app"
},
...
}
```
2. `/project`, the output folder to which the container image writes the generated assets.
#### Basic service template
Services that generate a template using code must contain the following files
that are valid:
- A *Dockerfile* located at the root of the `my-service` folder. This is the
Dockerfile that is used for the service when running the application.
- A *docker-compose.yaml* file located at the root of the `my-service` folder.
The `docker-compose.yaml` file must contain the service declaration and any
optional volumes or secrets.
Heres an example of a simple NodeJS service:
```bash
my-service
├── Dockerfile # The Dockerfile of the service template
└── assets
├── Dockerfile # The Dockerfile of the generated service
└── docker-compose.yaml # The service declaration
```
The NodeJS service contains the following files:
`my-service/Dockerfile`
```dockerfile
FROM alpine
COPY assets /assets
CMD ["cp", "/assets", "/project"]
FROM dockertemplate/interpolator:v0.1.5 as interpolator
COPY assets /assets
```
`my-service/assets/docker-compose.yaml`
{% raw %}
```yaml
version: "3.6"
services:
{{ .Name }}:
build: {{ .Name }}
ports:
- {{ .Parameters.externalPort }}:3000
```
{% endraw %}
`my-service/assets/Dockerfile`
```dockerfile
FROM NODE:9
WORKDIR /app
COPY package.json .
RUN yarn install
COPY . .
CMD ["yarn", "run", "start"]
```
> **Note:** After scaffolding the template, you can add the default files your
> template contains to the `assets` folder.
The next step is to build and push the service template image to a remote
repository by running the following command:
```bash
cd [...]/my-service
docker build -t org/my-service .
docker push org/my-service
```
### Create the service template definition
The service definition contains metadata that describes a service template. It
contains the name of the service, description, and available parameters such as
ports, volumes, etc. After creating the service definition, you can proceed to
[Add templates to Docker Template](#add-templates-to-docker-template) to add
the service definition to the Docker Template repository.
Of all the available service and application definitions, Docker Template has
access to only one catalog, referred to as the repository. It uses the
catalog content to display service and application templates to the end user.
Here is an example of the Express service definition:
```yaml
- apiVersion: v1alpha1 # constant
kind: ServiceTemplate # constant
metadata:
name: Express # the name of the service
platforms:
- linux
spec:
title: Express # The title/label of the service
icon: https://docker-application-template.s3.amazonaws.com/assets/express.png # url for an icon
description: NodeJS web application with Express server
source:
image: org/my-service:latest
```
The most important section here is `image: org/my-service:latest`. This is the
image associated with this service template. You can use this line to point to
any image. For example, you can use an Express image directly from the hub
`docker.io/dockertemplate/express:latest` or from the DTR private repository
`myrepo/my-service:latest`. The other properties in the service definition are
mostly metadata for display and indexation purposes.
#### Adding parameters to the service
Now that you have created a simple express service, you can customize it based
on your requirements. For example, you can choose the version of NodeJS to use
when running the service.
To customize a service, you need to complete the following tasks:
1. Declare the parameters in the service definition. This tells Docker Template
whether or not the CLI can accept the parameters, and allows the
[Application Designer](/ee/desktop/app-designer) to be aware of the new
options.
2. Use the parameters during service construction.
#### Declare the parameters
Add the parameters available to the application. The following example adds the
NodeJS version and the external port:
```yaml
- [...]
spec:
[...]
parameters:
- name: node
defaultValue: "9"
description: Node version
type: enum
values:
- value: "10"
description: "10"
- value: "9"
description: "9"
- value: "8"
description: "8"
- defaultValue: "3000"
description: External port
name: externalPort
type: hostPort
[...]
```
#### Use the parameters during service construction
When you run the service template container, a volume is mounted making the
service parameters available at `/run/configuration`.
The file matches the following go struct:
```golang
type TemplateContext struct {
ServiceID string `json:"serviceId,omitempty"`
Name string `json:"name,omitempty"`
Parameters map[string]string `json:"parameters,omitempty"`
TargetPath string `json:"targetPath,omitempty"`
Namespace string `json:"namespace,omitempty"`
Services []ConfiguredService `json:"services,omitempty"`
}
```
Where `ConfiguredService` is:
```go
type ConfiguredService struct {
ID string `json:"serviceId,omitempty"`
Name string `json:"name,omitempty"`
Parameters map[string]string `json:"parameters,omitempty"`
}
```
You can then use the file to obtain values for the parameters and use this
information based on your requirements. However, in most cases, the JSON file
is used to interpolate the variables. Therefore, we provide a utility called
`interpolator` that expands variables in templates. For more information, see
[Interpolator](#interpolator).
To use the `interpolator` image, update `my-service/Dockerfile` to use the
following Dockerfile:
```dockerfile
FROM dockertemplate/interpolator:v0.1.5
COPY assets .
```
> **Note:** The interpolator tag must match the version used in Docker
> Template. Verify this using the `docker template version` command .
This places the interpolator image in the `/assets` folder and copies the
folder to the target `/project` folder. If you prefer to do this manually, use
a Dockerfile instead:
```dockerfile
WORKDIR /assets
CMD ["/interpolator", "-config", "/run/configuration", "-source", "/assets", "-destination", "/project"]
```
When this is complete, use the newly added node option in
`my-service/assets/Dockerfile`, by replacing the line:
`FROM node:9`
with
{% raw %}`FROM node:{{ .Parameters.node }}`{% endraw %}
Now, build and push the image to your repository.
### Add service template to the library
You must add the service to a repository file in order to see it when you run
the `docker template ls` command, or to make the service available in the
Application Designer.
#### Create the repository file
Create a local repository file called `library.yaml` anywhere on your local
drive and add the newly created service definitions and application definitions
to it.
`library.yaml`
```yaml
apiVersion: v1alpha1
kind: RepositoryContent
services: # List of service templates available
- apiVersion: v1alpha1 # here is the service definition for our service template.
kind: ServiceTemplate
name: express
spec:
title: Express
[...]
```
#### Add the local repository to docker-template settings
> **Note:** You can also use the instructions in this section to add templates
> to the [Application Designer](/ee/desktop/app-designer).
Now that you have created a local repository and added service definitions to
it, you must make Docker Template aware of these. To do this:
1. Edit `~/.docker/application-template/preferences.yaml` as follows:
```yaml
apiVersion: v1alpha1
channel: master
kind: Preferences
repositories:
- name: library-master
url: https://docker-application-template.s3.amazonaws.com/master/library.yaml
```
2. Add your local repository:
> **Note:** Do not remove or comment out the default library `library-master`.
> This library contain template plugins that are required to build all Docker
> Templates.
```yaml
apiVersion: v1alpha1
channel: master
kind: Preferences
repositories:
- name: custom-services
url: file:///path/to/my/library.yaml
- name: library-master
url: https://docker-application-template.s3.amazonaws.com/master/library.yaml
```
When configuring a local repository on Windows, the `url` structure is slightly
different:
```yaml
- name: custom-services
url: file://c:/path/to/my/library.yaml
```
After updating the `preferences.yaml` file, run `docker template ls` or restart
the Application Designer and select **Custom application**. The new service
should now be visible in the list of available services.
### Share custom service templates
To share a custom service template, you must complete the following steps:
1. Push the image to an available endpoint (for example, Docker Hub)
2. Share the service definition (for example, GitHub)
3. Ensure the receiver has modified their `preferences.yaml` file to point to
the service definition that you have shared, and are permitted to accept
remote images.
## Create a custom application template
An application template is a collection of one or more service templates. You
must complete the following steps to create a custom application template:
1. Create an application template definition
2. Add the application template to the library
3. Share your custom application template
### Create the application definition
An application template definition contains metadata that describes an
application template. It contains information such as the name and description
of the template, the services it contains, and the parameters for each of the
services.
Before you create an application template definition, you must create a
repository that contains the services you are planning to include in the
template. For more information, see [Create the repository
file](#create-the-repository-file).
For example, to create an Express and MySQL application, the application
definition must be similar to the following yaml file:
```yaml
apiVersion: v1alpha1 #constant
kind: ApplicationTemplate #constant
metadata:
name: express-mysql #the name of the application
platforms:
- linux
spec:
description: Sample application with a NodeJS backend and a MySQL database
services: # list of the services
- name: back
serviceId: express # service name
parameters: # (optional) define the default application parameters
externalPort: 9000
- name: db
serviceId: mysql
title: Express / MySQL application
```
### Add the template to the library
Create a local repository file called `library.yaml` anywhere on your local
drive. If you have already created the `library.yaml` file, add the application
definitions to it.
`library.yaml`
```yaml
apiVersion: v1alpha1
kind: RepositoryContent
services: # List of service templates available
- apiVersion: v1alpha1 # here is the service definition for our service template.
kind: ServiceTemplate
name: express
spec:
title: Express
[...]
templates: # List of application templates available
- apiVersion: v1alpha1 #constant
kind: ApplicationTemplate # here is the application definition for our application template
metadata:
name: express-mysql
spec:
```
### Add the local repository to `docker-template` settings
Now that you have created a local repository and added application definitions,
you must make Docker Template aware of these. To do this:
1. Edit `~/.docker/application-template/preferences.yaml` as follows:
```yaml
apiVersion: v1alpha1
channel: master
kind: Preferences
repositories:
- name: library-master
url: https://docker-application-template.s3.amazonaws.com/master/library.yaml
```
2. Add your local repository:
> **Note:** Do not remove or comment out the default library `library-master`.
> This library contain template plugins that are required to build all Docker
> Templates.
```yaml
apiVersion: v1alpha1
channel: master
kind: Preferences
repositories:
- name: custom-services
url: file:///path/to/my/library.yaml
- name: library-master
url: https://docker-application-template.s3.amazonaws.com/master/library.yaml
```
When configuring a local repository on Windows, the `url` structure is slightly
different:
```yaml
- name: custom-services
url: file://c:/path/to/my/library.yaml
```
After updating the `preferences.yaml` file, run `docker template ls` or restart
the Application Designer and select **Custom application**. The new template
should now be visible in the list of available templates.
### Share the custom application template
To share a custom application template, you must complete the following steps:
1. Push the image to an available endpoint (for example, Docker Hub)
2. Share the application definition (for example, GitHub)
3. Ensure the receiver has modified their `preferences.yaml` file to point to
the application definition that you have shared, and are permitted to accept
remote images.
## Interpolator
The `interpolator` utility is basically an image containing a binary which:
- takes a folder (assets folder) and the service parameter file as input,
- replaces variables in the input folder using the parameters specified by the
user (for example, the service name, external port, etc), and
- writes the interpolated files to the destination folder.
The interpolator implementation uses [Golang
template](https://golang.org/pkg/text/template/) to aggregate the services to
create the final application. If your service template uses the `interpolator`
image by default, it expects all the asset files to be located in the `/assets`
folder:
`/interpolator -source /assets -destination /project`
However, you can create your own scaffolding script that performs calls to the
`interpolator`.
> **Note:** It is not mandatory to use the `interpolator` utility. You can use
> a utility of your choice to handle parameter replacement and file copying to
> achieve the same result.
The following table lists the `interpolator` binary options:
| Parameter | Default value | Description |
| :----------------|:---------------------|:--------------------------------------------------------------|
| `-source` | none | Source file or folder to interpolate from |
| `-destination` | none | Destination file or folder to copy the interpolated files to |
| `-config` | `/run/configuration` | The path to the json configuration file |
| `-skip-template` | false | If set to `true`, it copies assets without any transformation |

View File

@ -1,90 +0,0 @@
---
title: Advanced backend management
description: Advanced backend management for Docker Assemble
keywords: Backend, Assemble, Docker Enterprise, plugin, Spring Boot, .NET, c#, F#
---
## Backend access to host ports
Docker Assemble requires its own buildkit instance to be running in a Docker container on the local system. You can start and manage the backend using the `backend` subcommand of `docker assemble`. For more information, see [Install Docker Assemble](/install).
As the backend runs in a container with its own network namespace, it cannot access host resources directly. This is most noticeable when trying to push to a local registry as `localhost:5000`.
The backend supports a sidecar container which proxies ports from within the backend container to the container's gateway (which is in effect a host IP). This is sufficient to allow access to host ports which have been bound to `0.0.0.0` (or to the gateway specifically), but not ones which are bound to `127.0.0.1`.
By default, port 5000 is proxied in this way, as that is the most common port used for a local registry to allow access to a local registry on `localhost:5000` (the most common setup). You can proxy other ports using the `--allow-host-port` option to docker assemble backend start.
For example, to expose port `6000` instead of port `5000`, run:
```
$ docker assemble backend start --allow-host-port 6000
```
> **Notes:**
>
> - You can repeat the `--allow-host-port` option or give it a comma separated list of ports.
> - Passing `--allow-host-port 0` disables the default and no ports are exposed. For example:
>
> `$ docker assemble backend start --allow-host-port 0`
> - On Docker Desktop, this functionality allows the backend to access ports on the Docker Desktop VM host, rather than the Windows or macOS host. To access the the Windows or macOS host port, you can use `host.docker.internal` as usual.
## Backend sub-commands
### Info
The info sub-command describes the backend:
```
~$ docker assemble backend info
ID: 2f03e7d288e6bea770a2acba4c8c918732aefcd1946c94c918e8a54792e4540f (running)
Image: docker/assemble-backend@sha256:«…»
Sidecar containers:
- 0f339c0cc8d7 docker-assemble-backend-username-proxy-port-5000 (running)
Found 1 worker(s):
- 70it95b8x171u5g9jbixkscz9
Platforms:
- linux/amd64
Labels:
- com.docker.assemble.commit: «…»
- org.mobyproject.buildkit.worker.executor: oci
- org.mobyproject.buildkit.worker.hostname: 2f03e7d288e6
- org.mobyproject.buildkit.worker.snapshotter: overlayfs
Build cache contains 54 entries, total size 3.65GB (0B currently in use)
```
### Stop
The stop sub-command destroys the backend container
```
~$ docker assemble backend stop
```
### Logs
The logs sub-command displays the backend logs.
```
~$ docker assemble backend logs
```
### Cache
The build cache gets lost when the backend is stopped. To avoid this, you can create a volume named `docker-assemble-backend-cache-«username»` and it will automatically be used as the build cache.
Alternatively you can specify a named docker volume to use for the cache. For example:
```
~$ docker volume create $USER-assemble-cache
username-assemble-cache
~$ docker assemble backend start --cache-volume=username-assemble-cache
Pulling image «…»: Success
Started container "docker-assemble-backend-username" (74476d3fdea7)
```
For information regarding the current cache contents, run the command `docker assemble backend cache usage`.
To clean the cache, run `docker assemble backend cache purge`.

View File

@ -1,134 +0,0 @@
---
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

@ -1,81 +0,0 @@
---
title: Configure Docker Assemble
description: Installing Docker Assemble
keywords: Assemble, Docker Enterprise, plugin, Spring Boot, .NET, c#, F#
---
Although you dont need to configure anything to build a project using Docker Assemble, you may wish to override the defaults, and in some cases, add fields that werent automatically detected from the project file. To support this, Docker Assemble allows you to add a file `docker-assemble.yaml` to the root of your project. The settings you provide in the `docker-assemble.yaml` file overrides any auto-detection and can themselves be overridden by command-line arguments
The `docker-assemble.yaml` file is in YAML syntax and has the following informal schema:
- `version`: (_string_) mandatory, must contain `0.2.0`
- `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](/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`.
- `labels`: (_map_) contains labels to write into the image as `key`-`value` (_string_) pairs.
- `repository-namespace`: (_string_) the registry and path component of the desired output image. e.g. `docker.io/library` or `docker.io/user`.
- `repository-name`: (_string_) the name of the specific image within `repository-namespace`. Overrides any name derived from the build system specific configuration.
- `tag`: (_string_) the default tag to use. Overrides and version/tag derived from the build system specific configuration.
- `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](/assemble/images/#health-checks).
- `interval`: (_duration_) the time to wait between checks.
- `timeout`: (_duration_) the time to wait before considering the check to have hung.
- `start-period`: (_duration_) period for the container to initialize before the retries starts to count down
- `retries`: (_integer_) number of consecutive failures needed to consider a container as unhealthy.
- `springboot`: (_map_) if this is a Spring Boot project then contains related configuration options.
- `enabled`: (_boolean_) true if this is a springboot project.
- `java-version`: (_string_) configures the Java version to use. Valid options are `8` and `10`.
- `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](/assemble/images/#custom-base-images).
- `aspnetcore`: (_map_) if this is an ASP.NET Core project then contains related configuration options.
- `enabled`: (_boolean_) true if this is an ASP.NET Core project.
- `version`: (_string_) configures the ASP.NET Core version to use. Valid options are `1.0`, `1.1`, `2.0` and `2.1`.
- `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](/assemble/images/#custom-base-images).
> **Notes:**
>
> - The only mandatory field in `docker-assemble.yaml` is `version`. All other parameters are optional.
>
> - At most one of `dotnet` or `springboot` can be present in the yaml file.
>
> - Fields of type duration are integers with nanosecond granularity. However the following units of time are supported: `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. For example, `25s`.
Each setting in the configuration file has a command line equivalent which can be used with the `-o/--option` argument, which takes a `KEY=VALUE` string where `KEY` is constructed by joining each element of the YAML hierarchy with a period (.).
For example, the `image → repository-namespace` key in the YAML becomes `-o image.repository-namespace=NAME` on the command line and `springboot → enabled` becomes `-o springboot.enabled=BOOLEAN`.
The following convenience aliases take precedence over the `-o/--option` equivalents:
- `--namespace` is an alias for `image.repository-namespace`;
- `--name` corresponds to `image.repository-name`;
- `--tag` corresponds to `image.tag`;
- `--label` corresponds to `image.labels` (can be used multiple times);
- `--port` corresponds to `image.ports` (can be used multiple times)

View File

@ -1,65 +0,0 @@
---
title: Build a C# ASP.NET Core project
description: Building a C# ASP.NET Core project using Docker Assemble
keywords: Assemble, Docker Enterprise, Spring Boot, container image
---
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.
```
~$ git clone https://github.com/mbentley/dotnetdemo
Cloning into 'dotnetdemo'...
«…»
```
Build the project using the `docker assemble build` command by passing it the path to the source repository (or a subdirectory in the following example):
```
~$ docker assemble build dotnetdemo/dotnetdemo
«…»
Successfully built: docker.io/library/dotnetdemo:latest
```
The resulting image is exported to the local Docker image store using a name and a tag which are automatically determined by the project metadata.
```
~$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
dotnetdemo latest a055e61e3a9e 24 seconds ago 349MB
```
An image name consists of `«namespace»/«name»:«tag»`. Where, `«namespace»/` is optional and defaults to `none`. If the project metadata does not contain a tag (or a version), then latest is used. If the project metadata does not contain a name and it was not provided on the command line, then a fatal error occurs.
Use the `--namespace`, `--name` and `--tag` options to override each element of the image name:
```
~$ docker assemble build --name testing --tag latest dotnetdemo/
«…»
INFO[0007] Successfully built "testing:latest"
~$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
testing latest d7f41384814f 32 seconds ago 97.4MB
hello-boot 1 0dbc2c425cff 5 minutes ago 97.4MB
```
Run the container:
```
~$ docker run -d --rm -p 8080:80 dotnetdemo:latest
e1c54291e96967dad402a81c4217978a544e4d7b0fdd3c0a2e2cca384c3b4adb
~$ docker ps
CONTAINER ID IMAGE COMMAND «…» PORTS NAMES
e1c54291e969 dotnetdemo:latest "dotnet dotnetdemo.d…" «…» 0.0.0.0:8080->80/tcp lucid_murdock
~$ docker logs e1c54291e969
warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
No XML encryptor configured. Key {11bba23a-71ad-4191-b583-4f974e296033} may be persisted to storage in unencrypted form.
Hosting environment: Production
Content root path: /app
Now listening on: http://[::]:80
Application started. Press Ctrl+C to shut down.
~$ curl -s localhost:8080 | grep '<h4>'
<h4>This environment is </h4>
<h4>served from e1c54291e969 at 11/22/2018 16:00:23</h4>
~$ docker rm -f e1c54291e969
```

View File

@ -1,116 +0,0 @@
---
title: Docker Assemble images
description: Building Docker Assemble images
keywords: Assemble, Docker Enterprise, plugin, Spring Boot, .NET, c#, F#
---
## Multi-platform images
By default, Docker Assemble builds images for the `linux/amd64` platform and exports them to the local Docker image store. This is also true when running Docker Assemble on Windows or macOS. For some application frameworks, Docker Assemble can build multi-platform images to support running on several host platforms. For example, `linux/amd64` and `windows/amd64`.
To support multi-platform images, images must be pushed to a registry instead of the local image store. This is because the local image store can only import uni-platform images which match its platform.
To enable the multi-platform mode, use the `--push` option. For example:
```bash
$ docker assemble build --push /path/to/my/project
```
To push to an insecure (unencrypted) registry, use `--push-insecure` instead of `--push`.
## Custom base images
Docker Assemble allows you to override the base images for building and running your project. For example, the following `docker-assemble.yaml` file defines `maven:3-ibmjava-8-alpine` as the base build image and `openjdk:8-jre-alpine` as the base runtime image (for linux/amd64 platform).
```
version: "0.2.0"
springboot:
enabled: true
build-image: "maven:3-ibmjava-8-alpine"
runtime-images:
linux/amd64: "openjdk:8-jre-alpine"
```
Linux-based images must be Debian, Red Hat, or Alpine-based and have a standard environment with:
- `find`
- `xargs`
- `grep`
- `true`
- a standard POSIX shell (located at `/bin/sh`)
These tools are required for internal inspection that Docker Assemble performs on the images. Depending on the type of your project and your configuration, the base images must meet other requirements as described in the following sections.
### Spring Boot
Install Java JDK and maven on the base build image and ensure it is available in `$PATH`. Install a maven settings file as `/usr/share/maven/ref/settings-docker.xml` (irrespective of the install location of Maven).
Ensure the base runtime image has Java JRE installed and is available in `$PATH`. The build and runtime image must have the same version of Java installed.
Supported build platform:
- `linux/amd64`
Supported runtime platforms:
- `linux/amd64`
- `windows/amd64`
### ASP.NET Core
Install .NET Core SDK on the base build image and ensure it includes the [.NET Core command-line interface tools](https://docs.microsoft.com/en-us/dotnet/core/tools/?tabs=netcore2x).
Install [.NET Core command-line interface tools](https://docs.microsoft.com/en-us/dotnet/core/tools/?tabs=netcore2x) on the base runtime image.
Supported build platform:
- `linux/amd64`
Supported runtime platforms:
- `linux/amd64`
- `windows/amd64`
## Bill of lading
Docker Assemble generates a bill of lading when building an image. This contains information about the tools, base images, libraries, and packages used by Assemble to build the image and that are included in the runtime image. The bill of lading has two parts one for build and one for runtime.
The build part includes:
- The base image used
- A map of packages installed and their versions
- A map of libraries used for the build and their versions
- A map of build tools and their corresponding versions
The runtime part includes:
- The base image used
- A map of packages installed and their versions
- A map of runtime tools and their versions
You can find the bill of lading by inspecting the resulting image. It is stored using the label `com.docker.assemble.bill-of-lading`:
{% raw %}
```bash
$ docker image inspect --format '{{ index .Config.Labels "com.docker.assemble.bill-of-lading" }}' <image>
```
{% endraw %}
> **Note:** The bill of lading is only supported on the `linux/amd64` platform and only for images which are based on Alpine (`apk`), Red Hat (`rpm`) or Debian (`dpkg-query`).
## Health checks
Docker Assemble only supports health checks on `linux/amd64` based runtime images and require certain additional commands to be present depending on the value of `image.healthcheck.kind`:
- `simple-tcpport-open:` requires the `nc` command
- `springboot:` requires the `curl` and `jq` commands
On Alpine (`apk`) and Debian (`dpkg`) based images, these dependencies are installed automatically. For other base images, you must ensure they are present in the images you specify.
If your base runtime image lacks the necessary commands, you may need to set `image.healthcheck.kind` to `none` in your `docker-assemble.yaml` file.

View File

@ -1,41 +0,0 @@
---
title: Docker Assemble
description: Installing Docker Assemble
keywords: Assemble, Docker Enterprise, plugin, Spring Boot, .NET, c#, F#
---
>This is an experimental feature.
>
>{% include experimental.md %}
## Overview
Docker Assemble (`docker assemble`) is a plugin which provides a language and framework-aware tool that enables users to build an application into an optimized Docker container. With Docker Assemble, users can quickly build Docker images without providing configuration information (like Dockerfile) by auto-detecting the required information from existing framework configuration.
Docker Assemble supports the following application frameworks:
- [Spring Boot](https://spring.io/projects/spring-boot) when using the [Maven](https://maven.apache.org/) build system
- [ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core) (with C# and F#)
## System requirements
Docker Assemble requires a Linux, Windows, or a macOS Mojave with the Docker Engine installed.
## Install
Docker Assemble requires its own buildkit instance to be running in a Docker container on the local system. You can start and manage the backend using the `backend` subcommand of `docker assemble`.
To start the backend, run:
```
~$ docker assemble backend start
Pulling image «…»: Success
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](/assemble/adv-backend-manage/).

View File

@ -1,70 +0,0 @@
---
title: Build a Spring Boot project
description: Building a Spring Boot project using Docker Assemble
keywords: Assemble, Docker Enterprise, Spring Boot, container image
---
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-springframework` repository.
```
~$ git clone https://github.com/anokun7/docker-springframework
Cloning into 'docker-springframework'...
«…»
```
When you build a Spring Boot project, Docker Assemble automatically detects the information it requires from the `pom.xml` project file.
Build the project using the `docker assemble build` command by passing it the path to the source repository:
```
~$ docker assemble build docker-springframework
«…»
Successfully built: docker.io/library/hello-boot:1
```
The resulting image is exported to the local Docker image store using a name and a tag which are automatically determined by the project metadata.
```
~$ docker image ls | head -n 2
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-boot 1 00b0fbcf3c40 About a minute ago 97.4MB
```
An image name consists of `«namespace»/«name»:«tag»`. Where, `«namespace»/` is optional and defaults to `none`. If the project metadata does not contain a tag (or a version), then `latest` is used. If the project metadata does not contain a name and it was not provided on the command line, a fatal error occurs.
Use the `--namespace`, `--name` and `--tag` options to override each element of the image name:
```
~$ docker assemble build --name testing --tag latest docker-springframework/
«…»
INFO[0007] Successfully built "testing:latest"
~$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
testing latest d7f41384814f 32 seconds ago 97.4MB
hello-boot 1 0dbc2c425cff 5 minutes ago 97.4MB
```
Run the container:
```
~$ docker run -d --rm -p 8080:8080 hello-boot:1
b2c88bdc35761ba2b99f85ce1f3e3ce9ed98931767b139a0429865cadb46ce13
~$ docker ps
CONTAINER ID IMAGE COMMAND «…» PORTS NAMES
b2c88bdc3576 hello-boot:1 "java -Djava.securit…" «…» 0.0.0.0:8080->8080/tcp silly_villani
~$ docker logs b2c88bdc3576
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.2.RELEASE)
«…» : Starting Application v1 on b2c88bdc3576 with PID 1 (/hello-boot-1.jar started by root in /)
«…»
~$ curl -s localhost:8080
Hello from b2c88bdc3576
~$ docker rm -f b2c88bdc3576
```

View File

@ -1,15 +0,0 @@
---
datafolder: assemble
datafile: docker_assemble
title: docker assemble
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket or pull request
in the source repository on GitHub:
https://github.com/docker/app
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: assemble
datafile: docker_assemble_backend
title: docker assemble backend
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: assemble
datafile: docker_assemble_backend_cache
title: docker assemble backend cache
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: assemble
datafile: docker_assemble_backend_cache_purge
title: docker assemble backend cache purge
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: assemble
datafile: docker_assemble_backend_cache_usage
title: docker assemble backend cache usage
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: assemble
datafile: docker_assemble_backend_image
title: docker assemble backend image
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: assemble
datafile: docker_assemble_backend_info
title: docker assemble backend info
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: assemble
datafile: docker_assemble_backend_logs
title: docker assemble backend logs
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: assemble
datafile: docker_assemble_backend_start
title: docker assemble backend start
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: assemble
datafile: docker_assemble_backend_stop
title: docker assemble backend stop
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: assemble
datafile: docker_assemble_build
title: docker assemble build
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: assemble
datafile: docker_assemble_version
title: docker assemble version
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: application-template
datafile: docker_template
title: docker template
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: application-template
datafile: docker_template_config
title: docker template config
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: application-template
datafile: docker_template_config_set
title: docker template config set
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: application-template
datafile: docker_template_config_view
title: docker template config view
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: application-template
datafile: docker_template_inspect
title: docker template inspect
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: application-template
datafile: docker_template_list
title: docker template list
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: application-template
datafile: docker_template_scaffold
title: docker template scaffold
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}

View File

@ -1,15 +0,0 @@
---
datafolder: application-template
datafile: docker_template_version
title: docker template version
enterprise_only: true
skip_read_time: true
---
<!--
This page is automatically generated from Docker's source code. If you want to
suggest a change to the text that appears here, open a ticket in the documentation
repository:
https://github.com/docker/docker.github.io/issues/new
-->
{% include cli.md datafolder=page.datafolder datafile=page.datafile %}