Pull request review commentdocker/app
Update README to reflect the UX changes in Docker App
services: - ${port}:5678 ``` -You can test everything is working, by inspecting the application definition.--```console-$ docker app inspect-hello 0.1.0--Maintained by: yourusername--A simple text server--Service (1) Replicas Ports Image------------ -------- ----- ------hello 1 5678 hashicorp/http-echo+Next, define the default values for the App in the `parameters.yml` file: -Parameters (2) Value--------------- ------port 5678-text hello development+```yaml+port: 5678+text: hello development ``` -You can render the application to a Compose file with the provided default-values.--```console-$ docker app render-version: "3.2"-services:- hello:- command:- - -text- - hello development- image: hashicorp/http-echo- ports:- - mode: ingress- target: 5678- published: 5678- protocol: tcp-```+### Building an App image -You can then use that Compose file like any other. You could save it to disk or-pipe it straight to `docker stack` or `docker-compose` to run the-application.+Next, build an App image: ```console-$ docker app render | docker-compose -f - up-```+$ docker app build . -f hello.dockerapp -t myrepo/hello:0.1.0+[+] Building 0.7s (6/6) FINISHED+(...) (Build output) sha256:4a492748ae55170daadd1ddfff4db30e0ef3d38bf0f57a913512caa323e140de +``` -This is where it gets interesting. We can override those parameters at runtime,-using the `--set` option. Let's specify some different options and run `render`-again:+At this point, an App image with the `myrepo/hello:1.0.1` tag has been built from the `hello.dockerapp` App definition. This immutable App image includes all the service images at fixed versions that you can run or share. -```console-$ docker app render --set port=4567 --set text="hello production"-version: "3.2"-services:- hello:- command:- - -text- - hello production- image: hashicorp/http-echo- ports:- - mode: ingress- target: 5678- published: 4567- protocol: tcp-```+### Sharing and running the App -If you prefer you can create a standalone configuration file to store those-parameters. Let's create `prod.yml` with the following contents:--```yaml-text: hello production-port: 4567-```--You can then run using that configuration file like so:+To share your App image, push it to a container registry. ```console-$ docker app render --parameters-file prod.yml-```+$ docker app push myrepo/hello:0.1.0+``` -You can share your Application Package by pushing it to a container registry.+Now run your App: ```console-$ docker app push --tag myrepo/hello:0.1.0-```+$ docker app run myrepo/hello:0.1.0 +``` -Others can then use your Application Package by specifying the registry tag.+You can specify the Docker endpoint where an application is installed using a context. By default, your App will run on the currently active context. You can select another context with the `docker context use` command, and the `docker app run` command will thereafter run your app on this particular context. -```console-$ docker app inspect myrepo/hello:0.1.0-```+Whenever you define such a context, the installer image will run in the default context (i.e., on local host). You can then use the `--installer-context` to target another context to run the installer image. -**Note**: Commands like `install`, `upgrade`, `render`, etc. can also be used-directly on Application Packages that are in a registry.--You can specify the Docker endpoint where an application is installed using a-context and the `--context` option. If you do not specify one, it will -use the currently active context.+```console+$ docker context create remote --description "remote cluster" --docker host=tcp://<remote-ip>:<remote-port>+Successfully created context "remote" -Whenever you define such a context, the installer image will run in the `default`-context (i.e. on local host). You can use the `--installer-context` to target-another context to run the installer image.+$ docker context ls+NAME DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR+default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock https://localhost:6443 (default) swarm+remote remote cluster tcp://<remote-ip>:<remote-port> -More examples are available in the [examples](examples) directory.+$ docker context use remote+$ docker app run myrepo/hello:0.1.0+``` ## CNAB -Under the hood `docker app` is [CNAB](https://cnab.io) compliant. It generates a-CNAB from your application source and is able to install and manage any other-CNAB too. CNAB specifies three actions which `docker app` provides as commands:-* `install`-* `upgrade`-* `uninstall`--Here is an example installing an Application Package, inspect it and-then uninstalling it:-```console-$ docker app install examples/hello-world/example-hello-world.dockerapp --name hello-Creating network hello_default-Creating service hello_hello--$ docker app inspect hello-{- "Metadata": {- "version": "0.1.0",- "name": "hello-world",- "description": "Hello, World!",- "maintainers": [- {- "name": "user",- "email": "[email protected]"- }- ]- },- "Services": [- {- "Name": "hello",- "Image": "hashicorp/http-echo",- "Replicas": 1,- "Ports": "8080"- }- ],- "Parameters": {- "port": "8080",- "text": "Hello, World!"- },- "Attachments": [- {- "Path": "bundle.json",- "Size": 3189- }- ]-}--$ docker app uninstall hello-Removing service hello_hello-Removing network hello_default-```+Docker Apps are Docker’s implementation of the industry standard Cloud Native Application Bundle (CNAB). [CNAB](https://cnab.io/) is an industry specification put in place to facilitate the bundling, sharing, installing and managing of cloud-native apps that are not only made up of containers but also from such things as hosted databases, functions, etc. +Docker App is designed to abstract as many CNAB specifics as possible, to provide users with a tool that is easy to use while alleviating the need to bother with the CNAB specification. ## Installation -**Note**: Docker app is a _command line_ plugin (not be confused with docker _engine_ plugins), extending the `docker` command with `app` sub-commands.-It requires [Docker CLI](https://download.docker.com) 19.03.0 or later with experimental features enabled.-Either set environment variable `DOCKER_CLI_EXPERIMENTAL=enabled`-or update your [docker CLI configuration](https://docs.docker.com/engine/reference/commandline/cli/#experimental-features).--**Note**: Docker-app can't be installed using the `docker plugin install` command (yet)+Docker App is a *command line* plugin (not be confused with *docker engine plugins*) that extends the `docker` command with `app` sub-commands. It requires [Docker CLI](https://download.docker.com/) 19.03.0 or later, with experimental features enabled. Either set environment variable `DOCKER_CLI_EXPERIMENTAL=enabled` or update your [docker CLI configuration](https://docs.docker.com/engine/reference/commandline/cli/#experimental-features).
Should we keep that experimental part?
comment created time in a day
push eventdocker/app
commit sha d83eb35ed1c036a00bf3d56b276cb7040aedbc80
Experimental flags are hidden by experimentalCLI The code had the (wrong) annotation "experimental" Signed-off-by: Djordje Lukic <[email protected]>
commit sha 80c023313014a90c64dd7d76e1175a60dd313a5d
Merge pull request #736 from rumpl/experimentalCli Experimental flags are hidden by experimentalCLI
push time in a day
PR merged docker/app
The code had the (wrong) annotation "experimental"
pr closed time in a day
Pull request review commentdocker/app
Update README to reflect the UX changes in Docker App
services: - 5678:5678 ``` -With `docker app` [installed](#installation) let's create an Application Package-based on this Compose file:+Next, create an App definition using the `docker app init` command: ```console-$ docker app init hello+$ docker app init --compose-file docker-compose.yml hello+Created "hello.dockerapp" $ ls
You can use the tree command here
$ tree
.
├── docker-compose.yml
└── voting-app.dockerapp
├── docker-compose.yml
├── metadata.yml
└── parameters.yml
1 directory, 4 files
And maybe also add a note that the first docker-compose.yml file is not used anymore?
comment created time in a day
Pull request review commentdocker/app
Update README to reflect the UX changes in Docker App
-# Docker Application+# Docker App -A Docker CLI Plugin to configure, share and install applications:-* Extend [Compose files](https://docs.docker.com/compose/compose-file/) with metadata and parameters-* Re-use same application across multiple environments (Development/QA/Staging/Production)-* Multi orchestrator installation (Swarm or Kubernetes)-* Push/Pull/[Promotion](https://docs.docker.com/ee/dtr/user/promotion-policies/internal-promotion/)/[Signing](https://docs.docker.com/engine/security/trust/content_trust/) supported for application, with same workflow as images-* Fully [CNAB](https://cnab.io) compliant-* Full support of Docker Contexts+Docker App is a Cloud Native application packaging framework with which developers and devops can build, share, and run a set of microservices as a single entity. Docker Apps are based on the [Compose format](https://docs.docker.com/compose/compose-file/), which permits [docker-compose](https://github.com/docker/compose) users to easily share their Compose-based multiservice applications via container registries. By leveraging containers, Docker App makes it possible to easily change parts of the application and to share the application through container registries. -## The problem Application Packages solves+### Table of Contents+- **[What are the benefits offered by Docker App?](#what-are-the-benefits-offered-by-docker-app)**+- **[How does Docker App work?](#how-does-docker-app-work)**+- **[Using Docker App](#using-docker-app)**+ * **[Writing an App definition](#writing-an-app-definition)**+ * **[Building an App image](#building-an-app-image)**+ * **[Sharing the App on the Hub](#sharing-apps-on-the-hub)**+ * **[Running the App](#running-the-app)**+- **[Example](#example)**+ * **[App definition](#app-definition)**+ * **[Using parameters](#using-parameters)**+ * **[Building an App image](#building-an-app-image)**+ * **[Sharing and running the App](#sharing-and-running-the-app)**+- **[CNAB](#cnab)**+- **[Installation](#installation)**+ * **[Linux or macOS](#linux-or-macos)**+ * **[Windows](#windows)**+- **[Next steps](#next-steps)** -Compose files do a great job of describing a set of related services. Not only-are Compose files easy to write, they are generally easy to read as well.-However, a couple of problems often emerge:+## What are the benefits offered by Docker App? -1. You have several environments where you want to deploy the application, with small configuration differences-1. You have lots of similar applications+* Simple management of Docker Apps across different teams and between different environments (Development/QA/Staging/Production)+* Easy sharing of multi-service applications to container registries (e.g., [Docker Hub](https://hub.docker.com/) or [Docker Trusted Registry](https://docs.docker.com/ee/dtr/))+* Having a clear separation of parameters to be modified at runtime +* Support for multiple orchestrators (Swarm or Kubernetes)+* Provides the very same UX flow as the one for Docker images+* Implements the [CNAB](https://cnab.io) industry standard+* Offers full support of Docker Contexts -Fundamentally, Compose files are not easy to share between concerns. Docker-Application Packages aim to solve these problems and make Compose more useful-for development _and_ production.+## How does Docker App work? -## Looking at an example+The Docker App workflow is quite similar to the Docker image workflow. From an App definition, you can build an App image, share it on Docker Hub, and run your App on an orchestrator. -Let's take the following Compose file. It launches an HTTP server which prints-the specified text when hit on the configured port.+++## Using Docker App++Four primary steps comprise the Docker App process:+1. Writing an App Definition+1. Building an App Image+1. Sharing the App on the Hub (optional)+1. Running the App++### Writing an App definition++The first step in using Docker App is to write the App definition. This definition can be created (1) from an existing Compose file using the `docker app init` command (2) via a template from the Application Designer, or (3) from scratch. ++The App definition is a .dockerapp folder that contains three distinct pieces: metadata, a service list, and the parameters. ++metadata | Includes the App name and version; provides better traceability back to code changes when debugging issues+service list | Defined in a Compose file+parameters | Settings that can be changed when running the App++*Note: To store additional files in Docker Apps, such as* `prod.yml`*,* `test.yml` *or other config files, you need only to add these files to the *.dockerapp directory. All files will be packaged into the App image through the use of the* `docker app build` *command.*++### Building an App image++Once the App definition is written, the next step is to build the App image from the App definition using the `docker app build` command. With this command you can tag your App image, set build-time variables, or make the build quiet. +Note that service images inside of an App image are immutable, meaning that the App version ties to a fixed list of service images (i.e., updating the images inside of a Docker App requires recreating the App image).++### Sharing the App on the Hub++You can push any App image already built or pulled to Docker Hub (or any registry) using the `docker app push` command. You can also pull App images from any container registry using the `docker app pull` command.
I think we should add some content saying that when we push an app image, we also push all the service images, so the whole app is pushed?
comment created time in a day
Pull request review commentdocker/app
Update README to reflect the UX changes in Docker App
-# Docker Application+# Docker App -A Docker CLI Plugin to configure, share and install applications:-* Extend [Compose files](https://docs.docker.com/compose/compose-file/) with metadata and parameters-* Re-use same application across multiple environments (Development/QA/Staging/Production)-* Multi orchestrator installation (Swarm or Kubernetes)-* Push/Pull/[Promotion](https://docs.docker.com/ee/dtr/user/promotion-policies/internal-promotion/)/[Signing](https://docs.docker.com/engine/security/trust/content_trust/) supported for application, with same workflow as images-* Fully [CNAB](https://cnab.io) compliant-* Full support of Docker Contexts+Docker App is a Cloud Native application packaging framework with which developers and devops can build, share, and run a set of microservices as a single entity. Docker Apps are based on the [Compose format](https://docs.docker.com/compose/compose-file/), which permits [docker-compose](https://github.com/docker/compose) users to easily share their Compose-based multiservice applications via container registries. By leveraging containers, Docker App makes it possible to easily change parts of the application and to share the application through container registries. -## The problem Application Packages solves+### Table of Contents+- **[What are the benefits offered by Docker App?](#what-are-the-benefits-offered-by-docker-app)**+- **[How does Docker App work?](#how-does-docker-app-work)**+- **[Using Docker App](#using-docker-app)**+ * **[Writing an App definition](#writing-an-app-definition)**+ * **[Building an App image](#building-an-app-image)**+ * **[Sharing the App on the Hub](#sharing-apps-on-the-hub)**+ * **[Running the App](#running-the-app)**+- **[Example](#example)**+ * **[App definition](#app-definition)**+ * **[Using parameters](#using-parameters)**+ * **[Building an App image](#building-an-app-image)**+ * **[Sharing and running the App](#sharing-and-running-the-app)**+- **[CNAB](#cnab)**+- **[Installation](#installation)**+ * **[Linux or macOS](#linux-or-macos)**+ * **[Windows](#windows)**+- **[Next steps](#next-steps)** -Compose files do a great job of describing a set of related services. Not only-are Compose files easy to write, they are generally easy to read as well.-However, a couple of problems often emerge:+## What are the benefits offered by Docker App? -1. You have several environments where you want to deploy the application, with small configuration differences-1. You have lots of similar applications+* Simple management of Docker Apps across different teams and between different environments (Development/QA/Staging/Production)+* Easy sharing of multi-service applications to container registries (e.g., [Docker Hub](https://hub.docker.com/) or [Docker Trusted Registry](https://docs.docker.com/ee/dtr/))+* Having a clear separation of parameters to be modified at runtime +* Support for multiple orchestrators (Swarm or Kubernetes)+* Provides the very same UX flow as the one for Docker images+* Implements the [CNAB](https://cnab.io) industry standard+* Offers full support of Docker Contexts -Fundamentally, Compose files are not easy to share between concerns. Docker-Application Packages aim to solve these problems and make Compose more useful-for development _and_ production.+## How does Docker App work? -## Looking at an example+The Docker App workflow is quite similar to the Docker image workflow. From an App definition, you can build an App image, share it on Docker Hub, and run your App on an orchestrator. -Let's take the following Compose file. It launches an HTTP server which prints-the specified text when hit on the configured port.+++## Using Docker App++Four primary steps comprise the Docker App process:+1. Writing an App Definition+1. Building an App Image+1. Sharing the App on the Hub (optional)+1. Running the App++### Writing an App definition++The first step in using Docker App is to write the App definition. This definition can be created (1) from an existing Compose file using the `docker app init` command (2) via a template from the Application Designer, or (3) from scratch. ++The App definition is a .dockerapp folder that contains three distinct pieces: metadata, a service list, and the parameters. ++metadata | Includes the App name and version; provides better traceability back to code changes when debugging issues+service list | Defined in a Compose file+parameters | Settings that can be changed when running the App++*Note: To store additional files in Docker Apps, such as* `prod.yml`*,* `test.yml` *or other config files, you need only to add these files to the *.dockerapp directory. All files will be packaged into the App image through the use of the* `docker app build` *command.*++### Building an App image++Once the App definition is written, the next step is to build the App image from the App definition using the `docker app build` command. With this command you can tag your App image, set build-time variables, or make the build quiet. +Note that service images inside of an App image are immutable, meaning that the App version ties to a fixed list of service images (i.e., updating the images inside of a Docker App requires recreating the App image).
requires re-building the App image instead?
comment created time in a day
Pull request review commentdocker/app
Update README to reflect the UX changes in Docker App
-# Docker Application+# Docker App -A Docker CLI Plugin to configure, share and install applications:-* Extend [Compose files](https://docs.docker.com/compose/compose-file/) with metadata and parameters-* Re-use same application across multiple environments (Development/QA/Staging/Production)-* Multi orchestrator installation (Swarm or Kubernetes)-* Push/Pull/[Promotion](https://docs.docker.com/ee/dtr/user/promotion-policies/internal-promotion/)/[Signing](https://docs.docker.com/engine/security/trust/content_trust/) supported for application, with same workflow as images-* Fully [CNAB](https://cnab.io) compliant-* Full support of Docker Contexts+Docker App is a Cloud Native application packaging framework with which developers and devops can build, share, and run a set of microservices as a single entity. Docker Apps are based on the [Compose format](https://docs.docker.com/compose/compose-file/), which permits [docker-compose](https://github.com/docker/compose) users to easily share their Compose-based multiservice applications via container registries. By leveraging containers, Docker App makes it possible to easily change parts of the application and to share the application through container registries. -## The problem Application Packages solves+### Table of Contents+- **[What are the benefits offered by Docker App?](#what-are-the-benefits-offered-by-docker-app)**+- **[How does Docker App work?](#how-does-docker-app-work)**+- **[Using Docker App](#using-docker-app)**+ * **[Writing an App definition](#writing-an-app-definition)**+ * **[Building an App image](#building-an-app-image)**+ * **[Sharing the App on the Hub](#sharing-apps-on-the-hub)**+ * **[Running the App](#running-the-app)**+- **[Example](#example)**+ * **[App definition](#app-definition)**+ * **[Using parameters](#using-parameters)**+ * **[Building an App image](#building-an-app-image)**+ * **[Sharing and running the App](#sharing-and-running-the-app)**+- **[CNAB](#cnab)**+- **[Installation](#installation)**+ * **[Linux or macOS](#linux-or-macos)**+ * **[Windows](#windows)**+- **[Next steps](#next-steps)** -Compose files do a great job of describing a set of related services. Not only-are Compose files easy to write, they are generally easy to read as well.-However, a couple of problems often emerge:+## What are the benefits offered by Docker App? -1. You have several environments where you want to deploy the application, with small configuration differences-1. You have lots of similar applications+* Simple management of Docker Apps across different teams and between different environments (Development/QA/Staging/Production)+* Easy sharing of multi-service applications to container registries (e.g., [Docker Hub](https://hub.docker.com/) or [Docker Trusted Registry](https://docs.docker.com/ee/dtr/))+* Having a clear separation of parameters to be modified at runtime +* Support for multiple orchestrators (Swarm or Kubernetes)+* Provides the very same UX flow as the one for Docker images+* Implements the [CNAB](https://cnab.io) industry standard+* Offers full support of Docker Contexts -Fundamentally, Compose files are not easy to share between concerns. Docker-Application Packages aim to solve these problems and make Compose more useful-for development _and_ production.+## How does Docker App work? -## Looking at an example+The Docker App workflow is quite similar to the Docker image workflow. From an App definition, you can build an App image, share it on Docker Hub, and run your App on an orchestrator. -Let's take the following Compose file. It launches an HTTP server which prints-the specified text when hit on the configured port.+++## Using Docker App++Four primary steps comprise the Docker App process:+1. Writing an App Definition+1. Building an App Image+1. Sharing the App on the Hub (optional)+1. Running the App++### Writing an App definition++The first step in using Docker App is to write the App definition. This definition can be created (1) from an existing Compose file using the `docker app init` command (2) via a template from the Application Designer, or (3) from scratch. ++The App definition is a .dockerapp folder that contains three distinct pieces: metadata, a service list, and the parameters. ++metadata | Includes the App name and version; provides better traceability back to code changes when debugging issues+service list | Defined in a Compose file
Add a link to the Compose v3 reference?
[Compose file](https://docs.docker.com/compose/compose-file/)
comment created time in a day
Pull request review commentdocker/app
Update README to reflect the UX changes in Docker App
-# Docker Application+# Docker App -A Docker CLI Plugin to configure, share and install applications:-* Extend [Compose files](https://docs.docker.com/compose/compose-file/) with metadata and parameters-* Re-use same application across multiple environments (Development/QA/Staging/Production)-* Multi orchestrator installation (Swarm or Kubernetes)-* Push/Pull/[Promotion](https://docs.docker.com/ee/dtr/user/promotion-policies/internal-promotion/)/[Signing](https://docs.docker.com/engine/security/trust/content_trust/) supported for application, with same workflow as images-* Fully [CNAB](https://cnab.io) compliant-* Full support of Docker Contexts+Docker App is a Cloud Native application packaging framework with which developers and devops can build, share, and run a set of microservices as a single entity. Docker Apps are based on the [Compose format](https://docs.docker.com/compose/compose-file/), which permits [docker-compose](https://github.com/docker/compose) users to easily share their Compose-based multiservice applications via container registries. By leveraging containers, Docker App makes it possible to easily change parts of the application and to share the application through container registries. -## The problem Application Packages solves+### Table of Contents+- **[What are the benefits offered by Docker App?](#what-are-the-benefits-offered-by-docker-app)**+- **[How does Docker App work?](#how-does-docker-app-work)**+- **[Using Docker App](#using-docker-app)**+ * **[Writing an App definition](#writing-an-app-definition)**+ * **[Building an App image](#building-an-app-image)**+ * **[Sharing the App on the Hub](#sharing-apps-on-the-hub)**+ * **[Running the App](#running-the-app)**+- **[Example](#example)**+ * **[App definition](#app-definition)**+ * **[Using parameters](#using-parameters)**+ * **[Building an App image](#building-an-app-image)**+ * **[Sharing and running the App](#sharing-and-running-the-app)**+- **[CNAB](#cnab)**+- **[Installation](#installation)**+ * **[Linux or macOS](#linux-or-macos)**+ * **[Windows](#windows)**+- **[Next steps](#next-steps)** -Compose files do a great job of describing a set of related services. Not only-are Compose files easy to write, they are generally easy to read as well.-However, a couple of problems often emerge:+## What are the benefits offered by Docker App? -1. You have several environments where you want to deploy the application, with small configuration differences-1. You have lots of similar applications+* Simple management of Docker Apps across different teams and between different environments (Development/QA/Staging/Production)+* Easy sharing of multi-service applications to container registries (e.g., [Docker Hub](https://hub.docker.com/) or [Docker Trusted Registry](https://docs.docker.com/ee/dtr/))+* Having a clear separation of parameters to be modified at runtime +* Support for multiple orchestrators (Swarm or Kubernetes)+* Provides the very same UX flow as the one for Docker images+* Implements the [CNAB](https://cnab.io) industry standard+* Offers full support of Docker Contexts -Fundamentally, Compose files are not easy to share between concerns. Docker-Application Packages aim to solve these problems and make Compose more useful-for development _and_ production.+## How does Docker App work? -## Looking at an example+The Docker App workflow is quite similar to the Docker image workflow. From an App definition, you can build an App image, share it on Docker Hub, and run your App on an orchestrator. -Let's take the following Compose file. It launches an HTTP server which prints-the specified text when hit on the configured port.+++## Using Docker App++Four primary steps comprise the Docker App process:+1. Writing an App Definition+1. Building an App Image+1. Sharing the App on the Hub (optional)+1. Running the App++### Writing an App definition++The first step in using Docker App is to write the App definition. This definition can be created (1) from an existing Compose file using the `docker app init` command (2) via a template from the Application Designer, or (3) from scratch. ++The App definition is a .dockerapp folder that contains three distinct pieces: metadata, a service list, and the parameters. ++metadata | Includes the App name and version; provides better traceability back to code changes when debugging issues+service list | Defined in a Compose file+parameters | Settings that can be changed when running the App
Should we add "YAML formatted"? as we specify it's a Compose file for service list
comment created time in a day
Pull request review commentdocker/app
Update README to reflect the UX changes in Docker App
-# Docker Application+# Docker App -A Docker CLI Plugin to configure, share and install applications:-* Extend [Compose files](https://docs.docker.com/compose/compose-file/) with metadata and parameters-* Re-use same application across multiple environments (Development/QA/Staging/Production)-* Multi orchestrator installation (Swarm or Kubernetes)-* Push/Pull/[Promotion](https://docs.docker.com/ee/dtr/user/promotion-policies/internal-promotion/)/[Signing](https://docs.docker.com/engine/security/trust/content_trust/) supported for application, with same workflow as images-* Fully [CNAB](https://cnab.io) compliant-* Full support of Docker Contexts+Docker App is a Cloud Native application packaging framework with which developers and devops can build, share, and run a set of microservices as a single entity. Docker Apps are based on the [Compose format](https://docs.docker.com/compose/compose-file/), which permits [docker-compose](https://github.com/docker/compose) users to easily share their Compose-based multiservice applications via container registries. By leveraging containers, Docker App makes it possible to easily change parts of the application and to share the application through container registries. -## The problem Application Packages solves+### Table of Contents+- **[What are the benefits offered by Docker App?](#what-are-the-benefits-offered-by-docker-app)**+- **[How does Docker App work?](#how-does-docker-app-work)**+- **[Using Docker App](#using-docker-app)**+ * **[Writing an App definition](#writing-an-app-definition)**+ * **[Building an App image](#building-an-app-image)**+ * **[Sharing the App on the Hub](#sharing-apps-on-the-hub)**+ * **[Running the App](#running-the-app)**+- **[Example](#example)**+ * **[App definition](#app-definition)**+ * **[Using parameters](#using-parameters)**+ * **[Building an App image](#building-an-app-image)**+ * **[Sharing and running the App](#sharing-and-running-the-app)**+- **[CNAB](#cnab)**+- **[Installation](#installation)**+ * **[Linux or macOS](#linux-or-macos)**+ * **[Windows](#windows)**+- **[Next steps](#next-steps)** -Compose files do a great job of describing a set of related services. Not only-are Compose files easy to write, they are generally easy to read as well.-However, a couple of problems often emerge:+## What are the benefits offered by Docker App? -1. You have several environments where you want to deploy the application, with small configuration differences-1. You have lots of similar applications+* Simple management of Docker Apps across different teams and between different environments (Development/QA/Staging/Production)+* Easy sharing of multi-service applications to container registries (e.g., [Docker Hub](https://hub.docker.com/) or [Docker Trusted Registry](https://docs.docker.com/ee/dtr/))+* Having a clear separation of parameters to be modified at runtime +* Support for multiple orchestrators (Swarm or Kubernetes)+* Provides the very same UX flow as the one for Docker images+* Implements the [CNAB](https://cnab.io) industry standard+* Offers full support of Docker Contexts -Fundamentally, Compose files are not easy to share between concerns. Docker-Application Packages aim to solve these problems and make Compose more useful-for development _and_ production.+## How does Docker App work? -## Looking at an example+The Docker App workflow is quite similar to the Docker image workflow. From an App definition, you can build an App image, share it on Docker Hub, and run your App on an orchestrator. -Let's take the following Compose file. It launches an HTTP server which prints-the specified text when hit on the configured port.+++## Using Docker App++Four primary steps comprise the Docker App process:+1. Writing an App Definition+1. Building an App Image+1. Sharing the App on the Hub (optional)+1. Running the App++### Writing an App definition++The first step in using Docker App is to write the App definition. This definition can be created (1) from an existing Compose file using the `docker app init` command (2) via a template from the Application Designer, or (3) from scratch. ++The App definition is a .dockerapp folder that contains three distinct pieces: metadata, a service list, and the parameters. ++metadata | Includes the App name and version; provides better traceability back to code changes when debugging issues
Did you intend drawing a table here? Because otherwise it looks weird

comment created time in a day
Pull request review commentdocker/app
Update README to reflect the UX changes in Docker App
-# Docker Application+# Docker App -A Docker CLI Plugin to configure, share and install applications:-* Extend [Compose files](https://docs.docker.com/compose/compose-file/) with metadata and parameters-* Re-use same application across multiple environments (Development/QA/Staging/Production)-* Multi orchestrator installation (Swarm or Kubernetes)-* Push/Pull/[Promotion](https://docs.docker.com/ee/dtr/user/promotion-policies/internal-promotion/)/[Signing](https://docs.docker.com/engine/security/trust/content_trust/) supported for application, with same workflow as images-* Fully [CNAB](https://cnab.io) compliant-* Full support of Docker Contexts+Docker App is a Cloud Native application packaging framework with which developers and devops can build, share, and run a set of microservices as a single entity. Docker Apps are based on the [Compose format](https://docs.docker.com/compose/compose-file/), which permits [docker-compose](https://github.com/docker/compose) users to easily share their Compose-based multiservice applications via container registries. By leveraging containers, Docker App makes it possible to easily change parts of the application and to share the application through container registries. -## The problem Application Packages solves+### Table of Contents+- **[What are the benefits offered by Docker App?](#what-are-the-benefits-offered-by-docker-app)**+- **[How does Docker App work?](#how-does-docker-app-work)**+- **[Using Docker App](#using-docker-app)**+ * **[Writing an App definition](#writing-an-app-definition)**+ * **[Building an App image](#building-an-app-image)**+ * **[Sharing the App on the Hub](#sharing-apps-on-the-hub)**+ * **[Running the App](#running-the-app)**+- **[Example](#example)**+ * **[App definition](#app-definition)**+ * **[Using parameters](#using-parameters)**+ * **[Building an App image](#building-an-app-image)**+ * **[Sharing and running the App](#sharing-and-running-the-app)**+- **[CNAB](#cnab)**+- **[Installation](#installation)**+ * **[Linux or macOS](#linux-or-macos)**+ * **[Windows](#windows)**+- **[Next steps](#next-steps)** -Compose files do a great job of describing a set of related services. Not only-are Compose files easy to write, they are generally easy to read as well.-However, a couple of problems often emerge:+## What are the benefits offered by Docker App? -1. You have several environments where you want to deploy the application, with small configuration differences-1. You have lots of similar applications+* Simple management of Docker Apps across different teams and between different environments (Development/QA/Staging/Production)+* Easy sharing of multi-service applications to container registries (e.g., [Docker Hub](https://hub.docker.com/) or [Docker Trusted Registry](https://docs.docker.com/ee/dtr/))+* Having a clear separation of parameters to be modified at runtime +* Support for multiple orchestrators (Swarm or Kubernetes)+* Provides the very same UX flow as the one for Docker images+* Implements the [CNAB](https://cnab.io) industry standard+* Offers full support of Docker Contexts -Fundamentally, Compose files are not easy to share between concerns. Docker-Application Packages aim to solve these problems and make Compose more useful-for development _and_ production.+## How does Docker App work? -## Looking at an example+The Docker App workflow is quite similar to the Docker image workflow. From an App definition, you can build an App image, share it on Docker Hub, and run your App on an orchestrator. -Let's take the following Compose file. It launches an HTTP server which prints-the specified text when hit on the configured port.+++## Using Docker App++Four primary steps comprise the Docker App process:+1. Writing an App Definition+1. Building an App Image+1. Sharing the App on the Hub (optional)+1. Running the App++### Writing an App definition++The first step in using Docker App is to write the App definition. This definition can be created (1) from an existing Compose file using the `docker app init` command (2) via a template from the Application Designer, or (3) from scratch.
Should we add a link to an official page explaining what is Application Designer?
comment created time in a day
Pull request review commentdocker/app
Added created date to app images
func getImageListColumns(options imageListOption) []imageListColumn { imageListColumn{"APP NAME", func(p pkg) string { return p.bundle.Name }},+ imageListColumn{"CREATED", func(p pkg) string {+ payload, err := packager.CustomPayload(p.bundle.Bundle)+ if err != nil {+ return ""+ }+ if createdPayload, ok := payload.(packager.CustomPayloadCreated); ok {+ return units.HumanDuration(time.Now().UTC().Sub(createdPayload.CreatedTime())) + " ago"+ }+ return ""
I wonder if it should be empty "" or "N/A" ? @thaJeztah WDYT?
comment created time in a day
Pull request review commentdocker/app
Added created date to app images
func verifyImageIDListOutput(t *testing.T, cmd icmd.Cmd, count int, distinct int for scanner.Scan() { lines = append(lines, scanner.Text()) counter[scanner.Text()]+++ fmt.Println(scanner.Text())
Should we really print here?
comment created time in a day
Pull request review commentdocker/app
Added created date to app images
func insertBundles(t *testing.T, cmd icmd.Cmd) { func assertImageListOutput(t *testing.T, cmd icmd.Cmd, expected string) { result := icmd.RunCmd(cmd).Assert(t, icmd.Success)- match, _ := regexp.MatchString(expected, result.Stdout())+ stdout := result.Stdout()+ match, _ := regexp.MatchString(expected, stdout)+ if !match {+ fmt.Println(stdout)+ } assert.Assert(t, match)
I think you can add a third argument here, instead of checking match before assertion.
assert.Assert(t, match, stdout)
comment created time in a day
Pull request review commentdocker/app
Added created date to app images
func insertBundles(t *testing.T, cmd icmd.Cmd) { func assertImageListOutput(t *testing.T, cmd icmd.Cmd, expected string) { result := icmd.RunCmd(cmd).Assert(t, icmd.Success)- match, _ := regexp.MatchString(expected, result.Stdout())+ stdout := result.Stdout()+ match, _ := regexp.MatchString(expected, stdout)
I guess the error could be asserted here.
comment created time in a day
push eventdocker/app
commit sha 9c97d5bc8ad2c626c37b1d369cedd328b4d44b2f
--installer-context option is experimental Signed-off-by: Nicolas De Loof <[email protected]>
commit sha 04214e335c844ac610a28a7fa1f5156831800bfd
Merge pull request #733 from ndeloof/APP-333 --installer-context option is experimental
push time in a day
PR merged docker/app
- What I did
Made installer-context option experimental
- How I did it Annotate as experimental:true
- How to verify it if experimental is disabled, option is not available
- Description for the changelog
installer-context option is experimental
- A picture of a cute animal (not mandatory)

pr closed time in a day
Pull request review commentdocker/app
[WIP] Update README to reflect the UX changes in Docker App
-# Docker Application+# Docker App -A Docker CLI Plugin to configure, share and install applications:-* Extend [Compose files](https://docs.docker.com/compose/compose-file/) with metadata and parameters-* Re-use same application across multiple environments (Development/QA/Staging/Production)-* Multi orchestrator installation (Swarm or Kubernetes)-* Push/Pull/[Promotion](https://docs.docker.com/ee/dtr/user/promotion-policies/internal-promotion/)/[Signing](https://docs.docker.com/engine/security/trust/content_trust/) supported for application, with same workflow as images-* Fully [CNAB](https://cnab.io) compliant-* Full support of Docker Contexts+Docker App is a Cloud Native application packaging framework with which developers and devops can build, share, and run a set of microservices as a single entity. Docker Apps are based on the [Compose format](https://docs.docker.com/compose/compose-file/), which permits [docker-compose](https://github.com/docker/compose) users to easily share their Compose-based multiservice applications via container registries. By leveraging containers, Docker App makes it possible to easily change parts of the application and to share the application through container registries. -## The problem Application Packages solves+### Table of Contents+- **[What are the benefits offered by Docker App?](#what-are-the-benefits-offered-by-docker-app)**+- **[How does Docker App work?](#how-does-docker-app-work)**+- **[Using Docker App](#using-docker-app)**+ * **[Writing an App definition](#writing-an-app-definition)**+ * **[Building an App image](#building-an-app-image)**+ * **[Sharing the App on the Hub](#sharing-apps-on-the-hub)**+ * **[Running the App](#running-the-app)**+- **[Example](#example)**+ * **[App definition](#app-definition)**+ * **[Using parameters](#using-parameters)**+ * **[Building an App image](#building-an-app-image)**+ * **[Sharing and running the App](#sharing-and-running-the-app)**+- **[CNAB](#cnab)**+- **[Installation](#installation)**+ * **[Linux or macOS](#linux-or-macos)**+ * **[Windows](#windows)**+- **[Next steps](#next-steps)** -Compose files do a great job of describing a set of related services. Not only-are Compose files easy to write, they are generally easy to read as well.-However, a couple of problems often emerge:+## What are the benefits offered by Docker App? -1. You have several environments where you want to deploy the application, with small configuration differences-1. You have lots of similar applications+* Simple management of Docker Apps across different teams and between different environments (Development/QA/Staging/Production)+* Easy sharing of multi-service applications to container registries (e.g., [Docker Hub](https://hub.docker.com/) or [Docker Trusted Registry](https://docs.docker.com/ee/dtr/)) via multiple Docker images
Why multiple Docker images? 🤔
comment created time in a day
Pull request review commentdocker/app
WIP Added created date to app images
+package packager++import (+ "encoding/json"+ "time"++ "github.com/deislabs/cnab-go/bundle"+ "github.com/docker/app/internal"+)++const (+ // DockerAppCustomVersion1_0_0 is the custom payload version 1.0.0+ DockerAppCustomVersion1_0_0 = "1.0.0"++ // DockerAppCustomVersionCurrent the current payload version+ DockerAppCustomVersionCurrent = DockerAppCustomVersion1_0_0+)++// DockerAppCustom contains extension custom data that docker app injects+// in the bundle.+type DockerAppCustom struct {+ Version string `json:"version,omitempty"`+ Payload json.RawMessage `json:"payload,omitempty"`+}++// CustomPayloadCreated is a custom payload with a created time+type CustomPayloadCreated interface {
I guess this type should be versioned too, like CustomPayload_1_0_0 ?
comment created time in a day
Pull request review commentdocker/app
[WIP] APP-214 Enable 'docker app validate' for experimental mode only
required = ["github.com/wadey/gocovmerge"] name = "github.com/opencontainers/runtime-spec" revision = "29686dbc5559d93fb1ef402eeda3e35c38d75af4" +[[override]]+ name = "github.com/Microsoft/hcsshim"+ revision = "2226e083fc390003ae5aa8325c3c92789afa0e7a"+
nit: empty line
comment created time in 2 days
push eventdocker/cli
commit sha 22a5dad847f53dd5d1bde9a61027d13c0cbce94d
app-214 Load Client info in getter function Signed-off-by: Anca Iordache <[email protected]> Possible approach for client info - split ClientInfo() into ClientInfo() and loadClientInfo() - split ConfigFile() into ConfigFile() and loadConfigFile() - ConfigFile() and ClientInfo() call their corresponding loadXX function if it has not yet been loaded; this allows them to be used before Initialize() was called. - Initialize() *always* (re-)loads the configuration; this makes sure that the correct configuration is used when actually calling commands. Signed-off-by: Sebastiaan van Stijn <[email protected]>
commit sha 37f9a88c696ae81be14c1697bd083d6421b4933c
Merge pull request #2095 from aiordache/app-214_client_info_load_func APP-214 Load Client info in getter function
push time in 6 days
PR merged docker/cli
Change required by PR-625
- What I did
Moved cli config load in ClientInfo() function such that when calling it we don't have to initialize the struct in case it isn't.
- How I did it
Load cli config on the first call of ClientInfo().
- How to verify it
ClientInfo() should always return an object with the config data already loaded.
- Description for the changelog
Load cli config on the first call to the ClientInfo() from the cli interface
- A picture of a cute animal (not mandatory but encouraged)

pr closed time in 6 days
PR opened docker/cli
- Description for the changelog
- Bump compose-on-kubernetes from v0.4.25-alpha1 to v0.5.0-alpha1
- A picture of a cute animal (not mandatory but encouraged)

pr created time in 6 days
created tagdocker/compose-on-kubernetes
Deploy applications described in Compose onto Kubernetes clusters
created time in 6 days
delete branch silvin-lubecki/compose-on-kubernetes
delete branch : fix-push-on-alpha-tag
delete time in 6 days
push eventdocker/compose-on-kubernetes
commit sha bb840f848cdc9e01c318236790a531e0ca0089d8
Fix pushing unstable tag Signed-off-by: Silvin Lubecki <[email protected]>
commit sha 78e6a00beda64ac8ccb9fec787e601fe2ce0d5bb
Merge pull request #153 from silvin-lubecki/fix-push-on-alpha-tag Fix pushing unstable tag
push time in 6 days
PR merged docker/compose-on-kubernetes
Signed-off-by: Silvin Lubecki [email protected]
pr closed time in 6 days
PR opened docker/compose-on-kubernetes
Signed-off-by: Silvin Lubecki [email protected]
pr created time in 6 days
create barnchsilvin-lubecki/compose-on-kubernetes
branch : fix-push-on-alpha-tag
created branch time in 6 days
created tagdocker/compose-on-kubernetes
Deploy applications described in Compose onto Kubernetes clusters
created time in 6 days
created tagdocker/compose-on-kubernetes
Deploy applications described in Compose onto Kubernetes clusters
created time in 6 days
push eventdocker/compose-on-kubernetes
commit sha bbd07b410eac850c603ec1e51d25cb0729325f62
Bump vendoring Primary action was bumping the Kubernetes vendoring, other operations were to make it work. * Kubernetes to 1.16.2 * Removed `bitbucket.org/ww/goautoneg` as it is now included in Prometheus * Changed `serializer.DirectCodecFactory` to `serializer.WithoutConversionCodecFactory` in `api/client/clientset/typed/compose/*/compose_client.go` * Moved grpc to v1.23.1 * Ran `dep ensure -update sigs.k8s.io/structured-merge-diff` * Ran `dep ensure -update k8s.io/utils` Signed-off-by: Christopher Crone <[email protected]>
commit sha 3a3548401438408379ab775933a4293062bc0d05
Do not advertise protobuf support This fixes https://github.com/docker/compose-on-kubernetes/issues/150. As the `Stack` struct does not support being serialized to protobuf, we must not advertise that we support protobuf. Signed-off-by: Christopher Crone <[email protected]>
commit sha 33c88dd0e8f1f7981ec37f16f1b571ead564afd7
Fix controller health check for tests Signed-off-by: Christopher Crone <[email protected]>
commit sha f86fc7452f737b2bba30817f3ef9f3274b7d63c9
Bump etcd used in tests to v3.3.15 Signed-off-by: Christopher Crone <[email protected]>
commit sha a0726658a1d73777de75188dd8a8ed4128177d22
Raise the build timeout from 15m to 20m Signed-off-by: Silvin Lubecki <[email protected]>
commit sha 379a153ae5ce66be36578465adf42df7446830a9
Fix coverage hanging Signed-off-by: Silvin Lubecki <[email protected]>
commit sha eea981476406ab6874c17b58a51e0adb3ccf6951
Increase poll timeout from 5m to 10m for e2e tests Signed-off-by: Silvin Lubecki <[email protected]>
commit sha fb4b9b6a7f3c55c23d1c8f8a1cf7b23614140e4f
Merge pull request #149 from chris-crone/kube-1.16-vendoring Bump Kubernetes vendoring to 1.16.1
push time in 6 days
PR merged docker/compose-on-kubernetes
Additional information:
- Bumped kubernetes* to v1.16.1 in
Gopkg.toml - Changed
serializer.DirectCodecFactorytoserializer.WithoutConversionCodecFactoryinapi/client/clientset/typed/compose/*/compose_client.go - Changed expected error in
internal/registry/tableconvert_test.go - Removed
bitbucket.org/ww/goautonegas it is now included in Prometheus - Moved grpc to v1.23.1
- Ran
dep ensure -update sigs.k8s.io/structured-merge-diff - Ran
dep ensure -update k8s.io/utils
Fixes #150 by not advertising protobuf support.
pr closed time in 6 days
issue closeddocker/compose-on-kubernetes
k8s 1.16: serialization issue, namespace deletion hangs
Yesterday, I tried to integrate compose-on-kubernetes v0.4.24 in Docker Desktop but faced one strange issue. It's not triggered when using kind in the CI here.
Steps:
- Install Docker Desktop with Kubernetes 1.16 - https://download-stage.docker.com/mac/edge/39313/Docker.dmg
- Enable Kubernetes
kubectl create ns rediskubectl delete ns redishangs forever.
kube-controller log shows plenty of:
E1010 09:32:12.184709 1 namespace_controller.go:148] deletion of namespace redis failed: object *v1alpha3.StackList does not implement the protobuf marshalling interface and cannot be encoded to a protobuf message
kube-compose-apiserver logs:
E1010 09:32:27.861111 1 writers.go:172] apiserver was unable to write a JSON response: object *v1alpha3.StackList does not implement the protobuf marshalling interface and cannot be encoded to a protobuf message
Nothing special in kube-apiserver logs.
closed time in 6 days
guillaumerosepush eventchris-crone/compose-on-kubernetes
commit sha a914185118f6bcc48f08b4aa775e84707f7a4fd9
Bump docker version on circle-ci to 18.09.3 Signed-off-by: Silvin Lubecki <[email protected]>
commit sha 7b91eddc10e72a1846c5c12a485f0613f44a7d59
Add conditions to prevent pushing on latest tag with unstable releases and to create only draft releases. Signed-off-by: Silvin Lubecki <[email protected]>
commit sha 0e9cd2fa73297a211a5a63cd1f0cbbdae2a9d2e7
Merge pull request #152 from silvin-lubecki/release-alpha Better handle unstable releases
commit sha bbd07b410eac850c603ec1e51d25cb0729325f62
Bump vendoring Primary action was bumping the Kubernetes vendoring, other operations were to make it work. * Kubernetes to 1.16.2 * Removed `bitbucket.org/ww/goautoneg` as it is now included in Prometheus * Changed `serializer.DirectCodecFactory` to `serializer.WithoutConversionCodecFactory` in `api/client/clientset/typed/compose/*/compose_client.go` * Moved grpc to v1.23.1 * Ran `dep ensure -update sigs.k8s.io/structured-merge-diff` * Ran `dep ensure -update k8s.io/utils` Signed-off-by: Christopher Crone <[email protected]>
commit sha 3a3548401438408379ab775933a4293062bc0d05
Do not advertise protobuf support This fixes https://github.com/docker/compose-on-kubernetes/issues/150. As the `Stack` struct does not support being serialized to protobuf, we must not advertise that we support protobuf. Signed-off-by: Christopher Crone <[email protected]>
commit sha 33c88dd0e8f1f7981ec37f16f1b571ead564afd7
Fix controller health check for tests Signed-off-by: Christopher Crone <[email protected]>
commit sha f86fc7452f737b2bba30817f3ef9f3274b7d63c9
Bump etcd used in tests to v3.3.15 Signed-off-by: Christopher Crone <[email protected]>
commit sha a0726658a1d73777de75188dd8a8ed4128177d22
Raise the build timeout from 15m to 20m Signed-off-by: Silvin Lubecki <[email protected]>
commit sha 379a153ae5ce66be36578465adf42df7446830a9
Fix coverage hanging Signed-off-by: Silvin Lubecki <[email protected]>
commit sha eea981476406ab6874c17b58a51e0adb3ccf6951
Increase poll timeout from 5m to 10m for e2e tests Signed-off-by: Silvin Lubecki <[email protected]>
push time in 6 days
push eventchris-crone/compose-on-kubernetes
commit sha 68b8c8e9507f1300e07140f55ed52a4821338866
Increase poll timeout from 5m to 10m for e2e tests Signed-off-by: Silvin Lubecki <[email protected]>
push time in 7 days
Pull request review commentdocker/cli
APP-214 Load Client info in getter function
func (cli *DockerCli) ServerInfo() ServerInfo { // ClientInfo returns the client details for the cli func (cli *DockerCli) ClientInfo() ClientInfo {- return cli.clientInfo+
nit: empty line
comment created time in 7 days
Pull request review commentdocker/app
WIP Don't show ID as repository in image ls
func TestListCmd(t *testing.T) { }{ { name: "TestList",- expectedOutput: `REPOSITORY TAG APP IMAGE ID APP NAME-foo/bar <none> 3f825b2d0657 Digested App-foo/bar 1.0 9aae408ee04f Foo App-a855ac937f2ed375ba4396bbc49c4093e124da933acd2713fb9bc17d7562a087 <none> a855ac937f2e Quiet App+ expectedOutput: `REPOSITORY TAG APP IMAGE ID APP NAME+foo/bara <none> 3f825b2d0657 Digested App
Is bara a typo? 🤔
comment created time in 7 days
Pull request review commentdocker/app
Add warnings for env_file entries not copied
func TestRenderFormatters(t *testing.T) { }) } +func checkFileWarning(t *testing.T, goldenFile, composeData string) {+ cmd, cleanup := dockerCli.createTestCmd()+ defer cleanup()++ tmpDir := fs.NewDir(t, "app_input",+ fs.WithFile(internal.ComposeFileName, composeData),+ )+ defer tmpDir.Remove()++ cmd.Dir = tmpDir.Path()+ cmd.Command = dockerCli.Command("app", "init", "app-test",+ "--compose-file", tmpDir.Join(internal.ComposeFileName))+ stdErr := icmd.RunCmd(cmd).Assert(t, icmd.Success).Stderr()+ golden.Assert(t, stdErr, goldenFile)+}++func TestInitWarningEnvFiles(t *testing.T) {+ testCases := []struct {+ name string+ golden string+ compose string+ }{+ {+ name: "initWarningMultipleEnvFilesTest",
s/multiple/single/g?
comment created time in 8 days
push eventdocker/app
commit sha 7d376274c23fe5e4541811c720cca5a16a6711ba
Move render command under image command. Move bundle and installation parameters merging into a specific package to avoid package cycles Signed-off-by: Jean-Christophe Sirot <[email protected]>
commit sha 3c05deeb9ca2c1066a3eddf829d7f0c853bb59f5
Move ParametersOptions in order to make it accessible from different command packages Signed-off-by: Jean-Christophe Sirot <[email protected]>
commit sha f141d47878d0f9b60a7b8f8cf0f5c63916046f78
Merge pull request #726 from jcsirot/move-render-cmd-to-image Move render command under image command
push time in 8 days
PR merged docker/app
- What I did
Remove the render command and move it as new image subcommand.
- How I did it
Move render.go into image package.
Bundle parameters merging algorithm is invoked from some root commands and image render command. Therefore the bundle parameters merging had to be move to a dedicated package in order to avoid go package cycles.
- How to verify it
- run
docker app render myapp:mytagand ensure the command does not exist - run
docker app image render myapp:mytagand verify the App is rendered
- A picture of a cute animal (not mandatory)

pr closed time in 8 days
Pull request review commentdocker/app
Push local docker images and use relocation map
+package relocated++import (+ "io/ioutil"+ "os"++ "github.com/deislabs/cnab-go/bundle"+ "github.com/docker/cnab-to-oci/relocation"+ "github.com/docker/go/canonical/json"+)++type Bundle struct {+ *bundle.Bundle+ RelocationMap relocation.ImageRelocationMap+}++// FromBundle returns a RelocatedBundle with an empty relocation map.+func FromBundle(bndl *bundle.Bundle) *Bundle {+ return &Bundle{+ Bundle: bndl,+ RelocationMap: relocation.ImageRelocationMap{},+ }+}++// WriteRelocationMap serializes the relocation map and writes it to a file as JSON.+func (b *Bundle) WriteRelocationMap(dest string, mode os.FileMode) error {
Oh.. that's too bad that read and write sections are not in the same package 😞
comment created time in 8 days
PR opened silvin-lubecki/app
This Proof of Concept just adds kubectl binary into the invocation image, looks for a kube-manifest.yml file in the app definition which lists all the kube yaml to apply. Those YAMLs are rendered the same way we do with compose files (so parameters work too!) and then are applied using kubectl. In this PoC update and uninstallation are not handled.
Modified the hello world example with dumb kube yaml:
# added a kube-manifest file listing all the kube files to apply
$ tree hello-world.dockerapp
hello-world.dockerapp
├── docker-compose.yml
├── k8s
│ ├── deployment.yml
│ └── namespace.yml
├── kube-manifest.yml
├── metadata.yml
└── parameters.yml
1 directory, 6 files
$ cat hello-world.dockerapp/kube-manifest.yml
- k8s/namespace.yml
- k8s/deployment.yml
$ cat hello-world.dockerapp/k8s/deployment.yml
apiVersion: apps/v1
kind: Deployment
...
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: ${nginx.port}
# Kube YAML files are rendered too
$ cat hello-world.dockerapp/k8s/namespace.yml
apiVersion: v1
kind: Namespace
metadata:
name: ${kube.namespace}
labels:
name: ${kube.namespace}
$ car hello-world.dockerapp/parameters.yml
port: 8080
text: Hello, World!
nginx:
port: 8181
kube:
namespace: "mynamespace"
$ docker app build . -f hello-world.dockerapp -t hello-kube
[+] Building 0.3s (6/6) FINISHED
=> CACHED [internal] load remote build context 0.0s
=> CACHED copy /context / 0.0s
=> [internal] load metadata for docker.io/docker/cnab-app-base:v0.9.0-zeta1-49-gcbf819c597-dirty 0.0s
=> [1/2] FROM docker.io/docker/cnab-app-base:v0.9.0-zeta1-49-gcbf819c597-dirty 0.0s
=> => resolve docker.io/docker/cnab-app-base:v0.9.0-zeta1-49-gcbf819c597-dirty 0.0s
=> [2/2] COPY . . 0.1s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:b0de0c6767e062fb0687d50685e0bdfe19cf426b0a9d2768d76bc0407ac2f11b 0.0s
# It shows parameters and attachments
$ docker app image inspect hello-kube --pretty
version: 0.1.0
name: hello-world
description: Hello, World!
maintainers:
- name: user
email: [email protected]
SERVICE REPLICAS PORTS IMAGE
hello 1 8080 docker.io/hashicorp/http-echo:latest@sha256:ba27d460cd1f22a1a4331bdf74f4fccbc025552357e8a3249c40ae216275de96
PARAMETER VALUE
port 8080
text Hello, World!
ATTACHMENT SIZE
k8s/deployment.yml 314B
k8s/namespace.yml 145B
kube-manifest.yml 40B
# No deployment yet
$ kubectl get deployments
No resources found.
# No extra namespace
$ kubectl get namespaces
NAME STATUS AGE
default Active 108d
docker Active 108d
kube-node-lease Active 108d
kube-public Active 108d
kube-system Active 108d
# Kube YAMLs are applied before running the app
$ docker app run hello-kube --name hello-kube --orchestrator=kubernetes
Applying Kube YAML file "k8s/namespace.yml"
namespace/mynamespace created
Applying Kube YAML file "k8s/deployment.yml"
deployment.apps/nginx-deployment created
Waiting for the stack to be stable and running...
hello: Pending
hello: Ready
Stack hello-kube is stable and running
# namespace has been created, using the name defined in parameters
$ kubectl get namespaces
NAME STATUS AGE
default Active 108d
docker Active 108d
kube-node-lease Active 108d
kube-public Active 108d
kube-system Active 108d
mynamespace Active 7s
# nginx deployment is also there, along with the app
$ kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
hello 1/1 1 1 9s
nginx-deployment 2/2 2 2 10s
# 8181 port should be there, defined in parameters
$ kubectl describe deploy nginx-deployment
Name: nginx-deployment
Namespace: default
CreationTimestamp: Thu, 31 Oct 2019 20:05:45 +0100
...
Pod Template:
Labels: app=nginx
Containers:
nginx:
Image: nginx:1.7.9
Port: 8181/TCP
...
- A picture of a cute animal (not mandatory)

pr created time in 8 days
Pull request review commentdocker/app
Push local docker images and use relocation map
func (b *bundleStore) Store(ref reference.Reference, bndle *bundle.Bundle) (refe if err != nil { return id, errors.Wrapf(err, "failed to store bundle %q", ref) }- path := filepath.Join(dir, "bundle.json") if err := os.MkdirAll(dir, 0755); err != nil { return id, errors.Wrapf(err, "failed to store bundle %q", ref) }- if err = bndle.WriteFile(path, 0644); err != nil {++ // store bundle.json+ path := filepath.Join(dir, "bundle.json")+ if err = bndl.WriteFile(path, 0644); err != nil { return id, errors.Wrapf(err, "failed to store bundle %q", ref) }++ // store relocation map+ relocationMapPath := filepath.Join(dir, "relocation-map.json")+ if err = bndl.WriteRelocationMap(relocationMapPath, 0644); err != nil {
What about adding a Store method on relocated.Bundle type which would store both artifacts ?
comment created time in 8 days
Pull request review commentdocker/app
Push local docker images and use relocation map
+package relocated++import (+ "io/ioutil"+ "os"++ "github.com/deislabs/cnab-go/bundle"+ "github.com/docker/cnab-to-oci/relocation"+ "github.com/docker/go/canonical/json"+)++type Bundle struct {+ *bundle.Bundle+ RelocationMap relocation.ImageRelocationMap+}++// FromBundle returns a RelocatedBundle with an empty relocation map.+func FromBundle(bndl *bundle.Bundle) *Bundle {+ return &Bundle{+ Bundle: bndl,+ RelocationMap: relocation.ImageRelocationMap{},+ }+}++// WriteRelocationMap serializes the relocation map and writes it to a file as JSON.+func (b *Bundle) WriteRelocationMap(dest string, mode os.FileMode) error {
I wonder if the code in the package fetch should be here instead, along with WriteRelocationMap ?
comment created time in 8 days
Pull request review commentdocker/app
Push local docker images and use relocation map
+package relocatednit: file could be renamed to bundle.go, as relocated/relocated_bundle.go has kind of repetition 😄
comment created time in 8 days
Pull request review commentdocker/app
Push local docker images and use relocation map
+package fetch++import (+ "io/ioutil"+ "os"+ "path/filepath"++ "github.com/deislabs/cnab-go/bundle"+ "github.com/docker/app/internal/relocated"+ "github.com/docker/cnab-to-oci/relocation"+ "github.com/docker/go/canonical/json"+ "github.com/pkg/errors"+)++func BundleJSON(bundlePath string) (*bundle.Bundle, error) {+ data, err := ioutil.ReadFile(bundlePath)+ if err != nil {+ return nil, errors.Wrapf(err, "failed to read file %s", bundlePath)+ }+ bndl, err := bundle.Unmarshal(data)+ if err != nil {+ return nil, errors.Wrapf(err, "failed to read file %s", bundlePath)+ }+ return bndl, nil+}++func RelocationMapJSON(relocationMapPath string) (relocation.ImageRelocationMap, error) {
nit: it looks like this function is only used here in this package, so it may not be exported.
comment created time in 8 days
push eventsilvin-lubecki/app
commit sha 472296922536b5817e7c764b37569d90af41950e
Add --tag flag to the bundle command to persist the bundle in the local bundle store. Installation or any other command will be able to use this reference. Invocation image is using the same name, appending "-invoc" to the tag. Signed-off-by: Silvin Lubecki <[email protected]>
commit sha 5a5671062f878c5bf49c159668c2bacff82820ad
inspect: sort services, networks, volumes and secrets by name Networks, Volumes and Secrets are maps so iteration is randomized by the runtime. Although Services are an slice here they have, at some point, be laundered through a map and so also need sorting. Test by adding a second instance of each to the "full" test case and by always inspecting twice (in case the first one got lucky). Fixes: #525 Signed-off-by: Ian Campbell <[email protected]>
commit sha e8e4bb3bd7a5153eeb404aa2b11b6895c17112a3
Add the possibility to configure the base invocation image in the CLI config file. Print invocation base image version in the version command output. The docker app version command has a new --base-invocation-image flag which prints only the name the of image. Useful in order to pull or save the image. Signed-off-by: Jean-Christophe Sirot <[email protected]>
commit sha 8aacca23ef721ac2eabf24c8e5841bd9dd47a496
Merge pull request #521 from jcsirot/offline-base-cnab Provide support for using docker app offline
commit sha 257a6538b895b3ed67638b5110343bb69a286a45
e2e: Close the config file after writing it. Signed-off-by: Ian Campbell <[email protected]>
commit sha 9ece4d778f8926efd074087b15d44b772f14f91d
Allow the user to specify individual credentials on the command line e.g. docker app install --credential name=somevalue bundle.json Credentials added with `--credential` always come after those added with `--credential-set` (irrespective of the order on the command line). A credential specified with `--credential` cannot override any previous credential, including those specified in a credential set. The test bnudle used is based on https://github.com/deislabs/example-bundles/blob/0e8af9a2f1270bd72045a515637a432e74743d5d/example-credentials/bundle.json But with `cnab/example-credentials:latest` → a digested ref (with the digest I pulled today) Signed-off-by: Ian Campbell <[email protected]>
commit sha 368989a03ff6c12e08bd821e526a02e1e8cf8e49
Merge pull request #520 from silvin-lubecki/bundle-with-tag Bundle command now saves the bundle to the bundle store
commit sha 96d4d9bec487e747ef3a55ba8b30fba4c9039d27
metadata: Add helper to extract docker-app metadata from a bundle. Signed-off-by: Ian Campbell <[email protected]>
commit sha 8d7750b30d3584a5a46665ddce778eebd31d3126
push: wrap some errors so the error message has more context. Turns: denied: requested access to the resource is denied into: pushing to "docker.io/library/hello-world:0.1.0-invoc": denied: requested access to the resource is denied Signed-off-by: Ian Campbell <[email protected]>
commit sha 11955fe9da0dde16518a436d7204e9ed38d4383c
push: support pushing directly from a bundle file. This is done by providing a new `--bundle` option. Signed-off-by: Ian Campbell <[email protected]>
commit sha eca2252364a6bf59c9979e1a842847b14516b59a
push: autodetect when asked to push a bundle ... instead of requiring a separate option, this follows the pattern of `install` et al. Signed-off-by: Ian Campbell <[email protected]>
commit sha 594ce0efb50b73275c4f0a0a6a265fbb75a57b6c
e2e: Use subtests in render test. Separate the "file" and "stdio" case since they both error with "rendering mismatch". Signed-off-by: Ian Campbell <[email protected]>
commit sha ced138ba830f975b8d733b3b005e8fc9492a5d36
e2e: Add a test for pushing from a bundle and from a ref The use of `!strings.Contains()` in one assertion, rather than `!cmp.Contains()` is due to https://github.com/gotestyourself/gotest.tools/issues/147 Signed-off-by: Ian Campbell <[email protected]>
commit sha b9539583525ec06cc086e7aca0f2a34e7c1f245f
Merge pull request #529 from ijc/push-from-bundle Push directly from bundle
commit sha f2fbcae871cd80ba2389fef50879b961c0a2cee5
Merge pull request #531 from ijc/individual-credentials Allow the user to specify individual credentials on the command line
commit sha b4a8a4a6f97c0289339d9a375b19641f2d1e7723
Bump docker/cli Bump docker/docker Fix last changes on context stores made on docker/cli (the main store interface has been split to multiple smaller interfaces). Signed-off-by: Silvin Lubecki <[email protected]>
commit sha bbeedd73b103ac278537df5dd054b785de5f7eed
Bumping alpine 3.9.3 -> 3.9.4 Bumping golang/golang-cross 1.12.4 -> 1.12.5 Signed-off-by: Silvin Lubecki <[email protected]>
commit sha f5f38732b0044b06064c5330b250f78d5249bd6a
Merge pull request #538 from silvin-lubecki/bump Bumping vendoring and image dependencies
commit sha cbdc83942eb28a4f16a7bee4029823109104067b
Mark the app plugin as an experimental plugin. Only a cli with experimental flag enabled will list docker app as a plugin. Bump docker/cli to the last 19.03 Signed-off-by: Silvin Lubecki <[email protected]>
commit sha 73d867442d404f3e545e67b80b65545421d90e65
Merge pull request #537 from silvin-lubecki/experimental-plugin Mark docker app plugin as experimental
push time in 8 days
Pull request review commentdocker/app
Move render command under image command
import ( "github.com/spf13/cobra" ) +type parametersOptions struct {+ ParametersFiles []string+ Overrides []string+}++func (o *parametersOptions) addFlags(flags *pflag.FlagSet) {
Yep but as it is user facing code, if we change the behavior or add flags, we may forget this one...
comment created time in 8 days
Pull request review commentdocker/app
Move render command under image command
import ( "github.com/spf13/cobra" ) +type parametersOptions struct {+ ParametersFiles []string+ Overrides []string+}++func (o *parametersOptions) addFlags(flags *pflag.FlagSet) {
Is this part copy/pasted ? Shouldn't we factorize like you did with bundle parameters?
comment created time in 8 days
Pull request review commentdocker/app
Move render command under image command
-package commandsnit: rename package to bundle ? This file here has some redundancy bundleparams/parameters.go.
comment created time in 8 days
Pull request review commentdocker/app
func PrepareDriver(dockerCli command.Cli, bindMount BindMount, stdout io.Writer) for env := range d.Config() { driverCfg[env] = os.Getenv(env) }+ if driverCfg["CLEANUP_CONTAINERS"] != "true" && driverCfg["CLEANUP_CONTAINERS"] != "false" {
I wonder if we really need this?
comment created time in 9 days
push eventdocker/app
commit sha 154c45cfd3c739b5ecb15338d1b8be1d913d0358
Make render command takes exactly one argument which is an App image name. Rendering a .dockerapp dir is not allowed anymore Signed-off-by: Jean-Christophe Sirot <[email protected]>
commit sha 7263c1850409bdeb29b233acc0d639c0e319fbd2
Update e2e tests Signed-off-by: Jean-Christophe Sirot <[email protected]>
commit sha c2f76a85a91aa02db87fb691f59cf45ac273a865
Fix error handling and message when the App to render does not exist Signed-off-by: Jean-Christophe Sirot <[email protected]>
commit sha 6f5737ad3c7da31cd83c7a1d1f4e5147bbf7251a
Merge pull request #724 from jcsirot/app-render-image-only render command renders App image only
push time in 9 days
PR merged docker/app
- What I did
This PR ensure that the docker app render takes a App image reference argument and fails when a .dockerapp directory is used. If the image is not present locally in the bundle store, the App image is automatically fetched.
- How to verify it
Run docker app render myapp.dockerapp and verify it fails with an error indicating that App must be built first.
Run docker app render myapp:mytag --set param=some_value and verify the app is correctly rendered.
- A picture of a cute animal (not mandatory but encouraged)

pr closed time in 9 days
push eventdocker/app
commit sha af9fafd1f33e857693d550faf8c842f86bab35f8
APP-304 Update flag for App definition in app build help Signed-off-by: Anca Iordache <[email protected]>
commit sha 38bedc0ce69fc2eb82833c7a311df8f4d2ca7ffa
Merge pull request #725 from aiordache/app-304_correct_app_build_help APP-304 Update flag for App definition in app build help
push time in 9 days
PR merged docker/app
- What I did
Updated build flag for App description
- How to verify it
$ docker app build --help
Usage: docker app build [OPTIONS] BUILD_PATH
Build an App image from an App definition (.dockerapp)
Options:
...
-f, --file string App definition as a .dockerapp directory
...
- A picture of a cute animal (not mandatory) <img src="https://user-images.githubusercontent.com/809903/68135339-c70d8100-ff23-11e9-8405-a2c4348ac161.png" width=300>
Signed-off-by: Anca Iordache [email protected]
pr closed time in 9 days
Pull request review commentdocker/cnab-to-oci
update README about new push behavior
Copying descriptor sha256:a59a4e74d9cc89e4e75dfb2cc7ea5c108e4236ba6231b53081a9e2 Pushed successfully, with digest "sha256:6cabd752cb01d2efb9485225baf7fc26f4322c1f45f537f76c5eeb67ba8d83e0" ``` -**Note:** `cnab-to-oci` does not push images from your docker daemon image store.-Make sure all your invocation images are already present on a registry before pushing your bundle.+**Note:** if your images -invocation images as well as service images- are not present+on a registry `cnab-to-oci` will try to resolve them locally and push them from you
are not present on a registry -> are not already pushed on a registry,
push them from you -> push them from your
comment created time in 9 days
push eventchris-crone/compose-on-kubernetes
commit sha 59dfe2be5006dc21c36f13b5e2f1bc20fce9dea9
Revert "WIP: Comment out test" This reverts commit 3ffb3157da140c547d311da04d436a4862b43ec1.
push time in 9 days
pull request commentdocker/cli
Fix CREATED field when listing image if date is not specified
Thank you @jonatasbaldin !!
comment created time in 9 days
push eventdocker/cli
commit sha 56729bc0a483c03e2c56b4bb2f41cc823e642f02
Return empty string if image createdAt is zero Signed-off-by: Jonatas Baldin <[email protected]>
commit sha 9e041dd34cc459a0289767734a641eb71fb432dc
Merge pull request #2107 from jonatasbaldin/2047-fix-image-createdsince-without-value Fix CREATED field when listing image if date is not specified
push time in 9 days
PR merged docker/cli
Signed-off-by: Jonatas Baldin [email protected]
Fixes #2047.
- What I did
When listing images with the docker images command, returns <none> in the CREATED field if the date is not specified during the image build. Without this fix, a 292 years ago string was displayed.
- How I did it Added a special case in the CLI formatter.
- How to verify it
- Get an image that has no created date
docker pull nixery.dev/hello
Before the fix:
- Run
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nixery.dev/hello latest 866a9896ca80 292 years ago 28.1MB
After the fix:
REPOSITORY TAG IMAGE ID CREATED SIZE
nixery.dev/hello latest 866a9896ca80 <none> 28.1MB
- Description for the changelog Fix CREATED field when listing image if date is not specified.
- A picture of a cute animal (not mandatory but encouraged)
an alpaca an me

pr closed time in 9 days
issue closeddocker/cli
Display sensible values if image creation date is unspecified
<!-- If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.
For more information about reporting issues, see https://github.com/docker/cli/blob/master/CONTRIBUTING.md#reporting-other-issues
GENERAL SUPPORT INFORMATION
The GitHub issue tracker is for bug reports and feature requests. General support can be found at the following locations:
- Docker Support Forums - https://forums.docker.com
- Docker Community Slack - https://dockr.ly/community
- Post a question on StackOverflow, using the Docker tag
BUG REPORT INFORMATION
Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST -->
Description
Services that build content-addressable images (such as Nixery or Bazel's rules_docker) do not populate the "image creation date" field in image metadata. This is an intentional choice to create reproducible images.
The Docker client displays these images as being 292 years old, which is misleading. It should instead display <unknown> or some other sensible value.
Example issues:
Steps to reproduce the issue:
- Pull an image built with a tool that does not set the image creation date. To test this you can use the public Nixery instance, e.g.
docker pull nixery.dev/hellofor an image containing GNUhello. - Run
docker imagesand look at the output.
closed time in 9 days
tazjinpush eventchris-crone/compose-on-kubernetes
commit sha b59e7effbffe3cad08f42e238584c6c83719824f
Revert "WIP: Disable bind mount test" This reverts commit 5f676d04e487f914dfa666c6ab887dda44dbe30b.
push time in 9 days
create barnchsilvin-lubecki/compose-on-kubernetes
created branch time in 9 days
push eventchris-crone/compose-on-kubernetes
commit sha 979fd539ce13825b3c2644c567d0a953c82c59c6
Revert "Disable code coverage retrieval" This reverts commit f48765330f6dcda6955f07192b8cc666df8ac580.
commit sha 2f8c94d770e9bed5b21cef8e77add465d54abb67
Fix coverage hanging Signed-off-by: Silvin Lubecki <[email protected]>
push time in 9 days
issue closeddocker/cnab-to-oci
After we merge #78, I propose we do a new release so projects that use cnab-to-oci can cleanly use the newly added features.
Is there anything else we would want in this release? I'd very much propose we cut the release sooner rather than later, and just release again if we have other features.
closed time in 10 days
radu-mateiissue commentdocker/cnab-to-oci
Closed with latest release v0.3.0-beta1 👍
comment created time in 10 days
Pull request review commentdocker/app
func (o *parametersOptions) addFlags(flags *pflag.FlagSet) { flags.StringArrayVarP(&o.overrides, "set", "s", []string{}, "Override parameter value") } -type targetContextOptions struct {- targetContext string+type installerContextOptions struct {+ installerContext string+}++func (o *installerContextOptions) addFlag(flags *pflag.FlagSet) {+ flags.StringVar(&o.installerContext, "installer-context", "", "Context on which the installer image is ran (default: <current-context>)") } -func (o *targetContextOptions) SetDefaultTargetContext(dockerCli command.Cli) {- o.targetContext = getTargetContext(o.targetContext, dockerCli.CurrentContext())+func (o *installerContextOptions) setInstallerContext(dockerCli command.Cli) (command.Cli, error) {+ o.installerContext = getTargetContext(o.installerContext, dockerCli.CurrentContext())+ if o.installerContext != dockerCli.CurrentContext() {+ if _, err := dockerCli.ContextStore().GetMetadata(o.installerContext); err != nil {+ return nil, errors.Wrapf(err, "Unknown docker context %s", o.installerContext)+ }+ fmt.Fprintf(dockerCli.Out(), "Using context %q to run installer image", o.installerContext)+ cli, err := command.NewDockerCli()+ if err != nil {+ return nil, err+ }+ opts := flags.ClientOptions{+ Common: &flags.CommonOptions{+ Context: o.installerContext,+ LogLevel: logrus.GetLevel().String(),+ },+ ConfigDir: config.Dir(),+ }+ if err = cli.Apply(+ command.WithInputStream(dockerCli.In()),+ command.WithOutputStream(dockerCli.Out()),+ command.WithErrorStream(dockerCli.Err())); err != nil {+ return nil, err+ }+ if err = cli.Initialize(&opts); err != nil {+ return nil, err+ }+ return cli, nil+ }+ return dockerCli, nil } func getTargetContext(optstargetContext, currentContext string) string { var targetContext string switch { case optstargetContext != "": targetContext = optstargetContext- case os.Getenv("DOCKER_TARGET_CONTEXT") != "":- targetContext = os.Getenv("DOCKER_TARGET_CONTEXT")+ case os.Getenv("INSTALLER_TARGET_CONTEXT") != "":
nit: DOCKER_INSTALLER_CONTEXT?
comment created time in 10 days
Pull request review commentdeislabs/cnab-spec
Make status.json a CNAB Output
A CNAB indicates that it supports those actions by including them in its custom - `io.cnab.dry-run` (with `stateless`: true and `modifies`: false): execute the installation in a dry-run mode, allowing to see what would happen with the given set of parameter values. - `io.cnab.help` (with `stateless`: true and `modifies`: false): print an help message to the standard output. Implementations MAY print different messages depending on the parameters values passed to the invocation image. - `io.cnab.log` (with `stateless`: false and `modifies`: false): print logs of the installed system to the standard output.-- `io.cnab.status` (with `stateless`: false and `modifies`: false): print a human readable status message to the standard output.-- `io.cnab.status+json` (with `stateless`: false and `modifies`: false): print a json payload describing the detailed status as in the example below ([here](schema/status.schema.json) is the JSON schema for this):
I know this is only well known actions and not normative, but removing io.cnab.status+json may be considered as a breaking change? Do we know any bundle already implementing it? Shouldn't we instead deprecate it before removing it?
comment created time in 10 days
push eventsilvin-lubecki/cnab-bundles
commit sha 1d2b1842380a03b7e6ae0dcccebe20ecb76d7feb
First simple cnab + makefile Signed-off-by: Silvin Lubecki <[email protected]>
push time in 12 days
Pull request review commentdocker/app
render command renders App image only
func prepareCustomAction(actionName string, dockerCli command.Cli, appname strin if err != nil { return nil, nil, nil, err }- bundle, ref, err := cnab.ResolveBundle(dockerCli, bundleStore, appname)+ bundle, ref, err := cnab.GetBundle(dockerCli, bundleStore, appname) if err != nil {+ if strings.HasSuffix(appname, ".dockerapp") {
Maybe this test should be moved to cnab.GetBundle ? So all the commands would have the same behavior?
comment created time in 14 days
Pull request review commentdocker/app
render command renders App image only
func testRenderApp(appPath string, env ...string) func(*testing.T) { dir := fs.NewDir(t, "") defer dir.Remove() + // Build the App+ cmd.Command = dockerCli.Command("app", "build", ".", "--folder", filepath.Join(appPath, "my.dockerapp"), "--tag", "a-simple-tag", "--no-resolve-image")+ res := icmd.RunCmd(cmd).Assert(t, icmd.Success)+ fmt.Println(res.Combined())
Should we really print the build output?
comment created time in 14 days
created tagdocker/compose-on-kubernetes
Deploy applications described in Compose onto Kubernetes clusters
created time in 14 days
create barnchdocker/compose-on-kubernetes
created branch time in 14 days
push eventchris-crone/compose-on-kubernetes
commit sha f48765330f6dcda6955f07192b8cc666df8ac580
Disable code coverage retrieval Signed-off-by: Silvin Lubecki <[email protected]>
push time in 14 days
push eventchris-crone/compose-on-kubernetes
commit sha f5706d136a717b62cdc5b0e11a9c1e49b441d73a
Disable code coverage retrieval Signed-off-by: Silvin Lubecki <[email protected]>
push time in 14 days
push eventchris-crone/compose-on-kubernetes
commit sha c0d7d220384176d7aeacbb3084d1a6b97ade8dff
Raise the build timeout from 15m to 20m Signed-off-by: Silvin Lubecki <[email protected]>
push time in 14 days
delete branch silvin-lubecki/compose-on-kubernetes
delete branch : release-alpha
delete time in 14 days
PR merged docker/compose-on-kubernetes
Add conditions to
- prevent pushing on latest tag with unstable releases
- create only drafts with unstable releases
Bump docker version on circle-ci to 18.09.3
pr closed time in 14 days
push eventdocker/compose-on-kubernetes
commit sha a914185118f6bcc48f08b4aa775e84707f7a4fd9
Bump docker version on circle-ci to 18.09.3 Signed-off-by: Silvin Lubecki <[email protected]>
commit sha 7b91eddc10e72a1846c5c12a485f0613f44a7d59
Add conditions to prevent pushing on latest tag with unstable releases and to create only draft releases. Signed-off-by: Silvin Lubecki <[email protected]>
commit sha 0e9cd2fa73297a211a5a63cd1f0cbbdae2a9d2e7
Merge pull request #152 from silvin-lubecki/release-alpha Better handle unstable releases
push time in 14 days
push eventdocker/cnab-to-oci
commit sha 2ea13ab6f3d9fded5606114c6a4f0e6942e8a56c
allow to push local docker images by digest In the case `contentDigest` is defined (for example after a build by docker app) try to push local docker image from the digest. In that case, the `image` of the service is not defined in the bundle.json. If `contentDigest` is empty, do the same thing as before, so try to resolve and if it's not resolvable try to push. The service name is now displayed in error messages to better understand what's going on on failures. -- A `internal.ImageClient` interface has been added to only deal with methods from Docker's `ImageAPIClient` we need. Easier to mock for example. Signed-off-by: Yves Brissaud <[email protected]>
commit sha 5a97c84cb618aae63d98e5fb29b3116fbb01d358
Merge pull request #78 from eunomie/fix-push allow to push local docker images by digest
push time in 14 days
PR merged docker/cnab-to-oci
In the case contentDigest is defined (for example after a build
by docker app) try to push local docker image from the digest.
In that case, the image of the service is not defined in the
bundle.json.
If contentDigest is empty, do the same thing as before, so try to resolve
and if it's not resolvable try to push.
The service name is now displayed in error messages to better understand what's going on on failures.
Signed-off-by: Yves Brissaud [email protected]
pr closed time in 14 days
Pull request review commentdocker/cnab-to-oci
allow to push local docker images by digest
func fixupPlatforms(ctx context.Context, return nil } -func fixupBaseImage(ctx context.Context, baseImage *bundle.BaseImage, cfg fixupConfig) (imageFixupInfo, error) {+func fixupBaseImage(ctx context.Context, name string, baseImage *bundle.BaseImage, cfg fixupConfig) (imageFixupInfo, bool, error) { // Check image references if err := checkBaseImage(baseImage); err != nil {- return imageFixupInfo{}, fmt.Errorf("invalid image %q: %s", baseImage.Image, err)+ return imageFixupInfo{}, false, fmt.Errorf("invalid image %q for service %q: %s", baseImage.Image, name, err) } targetRepoOnly, err := reference.ParseNormalizedNamed(cfg.targetRef.Name()) if err != nil {- return imageFixupInfo{}, err- }- sourceImageRef, err := reference.ParseNormalizedNamed(baseImage.Image)- if err != nil {- return imageFixupInfo{}, fmt.Errorf("%q is not a valid image reference for %q: %s", baseImage.Image, cfg.targetRef, err)+ return imageFixupInfo{}, false, err }- sourceImageRef = reference.TagNameOnly(sourceImageRef) - // Try to fetch the image descriptor- _, descriptor, err := cfg.resolver.Resolve(ctx, sourceImageRef.String())- if err != nil {- if cfg.pushImages {- descriptor, err = pushImageToTarget(ctx, baseImage, cfg)- if err != nil {- return imageFixupInfo{}, err+ var descriptor ocischemav1.Descriptor
You can group vars in a var block:
var(
descriptor ocischemav1.Descriptor
sourceImageRef reference.Named
)
comment created time in 14 days
push eventchris-crone/compose-on-kubernetes
commit sha a17c7ef6fabbba0ac92986b221345954eff42f3d
Raise the build timeout from 15m to 20m Signed-off-by: Silvin Lubecki <[email protected]>
push time in 14 days
PR opened docker/compose-on-kubernetes
Add conditions to
- prevent pushing on latest tag with unstable releases
- create only drafts with unstable releases
Bump docker version on circle-ci to 18.09.3
pr created time in 14 days
create barnchsilvin-lubecki/compose-on-kubernetes
created branch time in 14 days
Pull request review commentdocker/app
Add service image build example
+# Version of the application+version: 0.1.0+# Name of the application+name: build-demo+# A short description of the application+description: +# List of application maintainers with name and email for each+maintainers:+ - name: chris
Beware, you'll have to maintain this app! :troll:
comment created time in 15 days
Pull request review commentdocker/cnab-to-oci
allow to push local docker images by digest
func (f *mockFetcher) Fetch(ctx context.Context, desc ocischemav1.Descriptor) (i f.indexBuffers = f.indexBuffers[1:] return rc, nil }++type mockReadCloser struct {+}++func (rc mockReadCloser) Read(p []byte) (n int, err error) {+ return 0, io.EOF+}++func (rc mockReadCloser) Close() error {+ return nil+}++type mockImageAPIClient struct {+}++func newMockImageAPIClient() *mockImageAPIClient {
I think this mock shows we need our own interface here. We should add a simple interface with only what we use:
type ImageClient interface{
ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error)
}
Using that simple interface means a simpler mock 😸
comment created time in 15 days
Pull request review commentdocker/cnab-to-oci
allow to push local docker images by digest
func fixupImage(ctx context.Context, baseImage *bundle.BaseImage, relocationMap } } + if pushed {+ notifyEvent(FixupEventTypeCopyImageEnd, "Image has been pushed for service"+name, nil)
nit: I think a space is missing between space and name
comment created time in 15 days
Pull request review commentdocker/app
WIP Add inspect command to display info of running application only
+package commands++import (+ "fmt"+ "os"+ "strings"++ "github.com/deislabs/cnab-go/action"+ "github.com/docker/app/internal"+ "github.com/docker/app/internal/cnab"+ "github.com/docker/app/internal/inspect"+ "github.com/docker/cli/cli"+ "github.com/docker/cli/cli/command"+ "github.com/spf13/cobra"+)++type inspectOptions struct {+ credentialOptions+ pretty bool+ orchestrator string+}++func inspectCmd(dockerCli command.Cli) *cobra.Command {+ var opts inspectOptions+ cmd := &cobra.Command{+ Use: "inspect [APP_NAME] [OPTIONS]",+ Short: "Shows installation and application metadata, parameters and the containers list of a running application",+ Example: `$ docker app inspect my-installed-app+$ docker app inspect my-app:1.0.0`,
I wonder if that example is correct, shouldn't it be docker app image inspect ?
comment created time in 15 days
Pull request review commentdocker/app
WIP Add inspect command to display info of running application only
+package commands++import (+ "fmt"+ "os"+ "strings"++ "github.com/deislabs/cnab-go/action"+ "github.com/docker/app/internal"+ "github.com/docker/app/internal/cnab"+ "github.com/docker/app/internal/inspect"+ "github.com/docker/cli/cli"+ "github.com/docker/cli/cli/command"+ "github.com/spf13/cobra"+)++type inspectOptions struct {+ credentialOptions+ pretty bool+ orchestrator string+}++func inspectCmd(dockerCli command.Cli) *cobra.Command {+ var opts inspectOptions+ cmd := &cobra.Command{+ Use: "inspect [APP_NAME] [OPTIONS]",+ Short: "Shows installation and application metadata, parameters and the containers list of a running application",+ Example: `$ docker app inspect my-installed-app
nit: my-running-app
comment created time in 15 days
Pull request review commentdocker/app
WIP Add inspect command to display info of running application only
+package commands++import (+ "fmt"+ "os"+ "strings"++ "github.com/deislabs/cnab-go/action"+ "github.com/docker/app/internal"+ "github.com/docker/app/internal/cnab"+ "github.com/docker/app/internal/inspect"+ "github.com/docker/cli/cli"+ "github.com/docker/cli/cli/command"+ "github.com/spf13/cobra"+)++type inspectOptions struct {+ credentialOptions+ pretty bool+ orchestrator string+}++func inspectCmd(dockerCli command.Cli) *cobra.Command {+ var opts inspectOptions+ cmd := &cobra.Command{+ Use: "inspect [APP_NAME] [OPTIONS]",
inspect [OPTIONS] RUNNING_APP
comment created time in 15 days