This repository has been archived by the owner on Jun 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #512 from chris-crone/readme-20190417
Rework examples and top level README
- Loading branch information
Showing
38 changed files
with
515 additions
and
961 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,24 @@ | ||
## Examples | ||
|
||
This folder contains several examples of applications built using `docker-app`, from a simple `hello-world` application to more complex, multi-service applications. | ||
This folder contains several examples of applications built using Docker | ||
Application, from a simple `hello-world` application to more complex, | ||
multi-service applications. | ||
|
||
### Hello world application: [hello world](hello-world) | ||
### [Hello world!](hello-world) | ||
|
||
To learn how to create a simple app that displays a given text. | ||
Learn how the basics of how to write a simple Docker Application. | ||
|
||
![Hello world app screenshot](.resources/hello-world.png "Hello world app screenshot") | ||
### [Convert an existing Compose file](voting-app) | ||
|
||
### Voting application: [voting-app](voting-app) | ||
Learn how to create a Docker Application from an existing Compose file using the | ||
Docker voting app from [Docker samples](https://github.com/dockersamples). | ||
|
||
To learn how to create the Docker voting app from [Docker samples](https://github.com/dockersamples). | ||
### [Docker Application CNAB generation](cnab-simple) | ||
|
||
![Voting app screenshot](.resources/cats-or-dogs.png "Voting app screenshot") | ||
Create a [CNAB](https://cnab.io) `bundle.json` and invocation image from a | ||
Docker Application. | ||
|
||
### WordPress application: [WordPress](wordpress) | ||
### [Deploy a Helm Chart CNAB using Docker App](cnab-helm) | ||
|
||
To learn how to create a basic WordPress with a database. | ||
|
||
![WordPress app screenshot](.resources/wordpress.png "WordPress app screenshot") | ||
|
||
### [CNAB simple application](cnab-simple) | ||
|
||
Inspect and bundle a simple application as a [CNAB](https://cnab.io). | ||
|
||
### [Deploy a Helm Chart using docker-app](cnab-helm) | ||
|
||
As `docker-app` is a [CNAB](https://cnab.io) compliant client, you can deploy any CNAB. | ||
As Docker App is a [CNAB](https://cnab.io) compliant client, you can deploy any | ||
CNAB. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM cnab/k8sbase:latest | ||
|
||
COPY app/Makefile /cnab/app/Makefile | ||
COPY app/charts /cnab/app/charts | ||
COPY app/charts /cnab/app/charts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
FROM alpine:3.7 | ||
|
||
CMD ["sleep", "9000"] | ||
CMD ["sleep", "9000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: mycreds | ||
credentials: | ||
- name: kubeconfig | ||
source: | ||
path: $HOME/.kube/config |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,66 @@ | ||
## Requirements | ||
# Docker Application to CNAB | ||
|
||
* Working Docker Desktop install with Kubernetes enabled | ||
* [`docker-app` with CNAB support](https://github.com/docker/app/releases/tag/cnab-dockercon-preview) installed | ||
### Requirements | ||
|
||
* [Docker Desktop](https://www.docker.com/products/docker-desktop) with Kubernetes enabled or any other Kubernetes cluster | ||
* Source code from this directory | ||
* Create a context with `docker-app context` | ||
* Set the `DOCKER_TARGET_CONTEXT` environment variable | ||
|
||
## Examples | ||
### Examples | ||
|
||
Show the details of the application with `inspect` | ||
|
||
```console | ||
$ docker-app inspect | ||
hello 0.1.0 | ||
$ docker app inspect | ||
hello 0.2.0 | ||
|
||
Maintained by: garethr <garethr@docker.com> | ||
Maintained by: garethr <someone@example.com> | ||
|
||
sample app for DockerCon | ||
Sample app for DockerCon EU 2018 | ||
|
||
Service (1) Replicas Ports Image | ||
----------- -------- ----- ----- | ||
hello 1 8765 hashicorp/http-echo:latest | ||
hello 1 8765 hashicorp/http-echo:0.2.3 | ||
|
||
Parameters (3) Value | ||
Parameters (2) Value | ||
-------------- ----- | ||
port 8765 | ||
text hello DockerCon | ||
version latest | ||
text Hello DockerCon! | ||
``` | ||
|
||
Install the application: | ||
|
||
```console | ||
$ docker-app install | ||
$ docker app install | ||
``` | ||
|
||
Show the details of the installation: | ||
|
||
```console | ||
$ docker-app status hello | ||
$ docker app status hello | ||
``` | ||
|
||
Upgrade the installation, demonstrating setting parameters: | ||
|
||
```console | ||
$ docker-app upgrade --set port=9876 --set text="hello DockerCon EU" hello | ||
$ docker app upgrade --set port=9876 --set text="hello DockerCon EU" hello | ||
``` | ||
|
||
Uninstall the application installation: | ||
|
||
```console | ||
$ docker-app uninstall hello | ||
$ docker app uninstall hello | ||
``` | ||
|
||
Demonstrate building a `bundle.json` for CNAB. | ||
|
||
```console | ||
$ docker-app bundle | ||
Invocation image "hello:0.1.0-invoc" successfully built | ||
$ docker app bundle | ||
Invocation image "hello:0.2.0-invoc" successfully built | ||
$ cat bundle.json | ||
{ | ||
"name": "hello", | ||
"version": "0.2.0", | ||
"description": "Sample app for DockerCon EU 2018", | ||
... | ||
} | ||
``` |
Oops, something went wrong.