From 40b211be288841957e0142a717f285e945f17725 Mon Sep 17 00:00:00 2001 From: Ignacio Van Droogenbroeck Date: Thu, 1 Oct 2020 15:17:02 -0300 Subject: [PATCH] change from rich format to markdown --- docs/archive/1.23.2/configuration.md | 74 ++++++--------- docs/archive/1.23.2/deployment.md | 4 +- docs/archive/1.23.2/external_endpoints.md | 10 +- docs/archive/1.23.2/templates.md | 108 +++++++++++----------- docs/archive/1.23.2/troubleshooting.md | 4 +- 5 files changed, 93 insertions(+), 107 deletions(-) diff --git a/docs/archive/1.23.2/configuration.md b/docs/archive/1.23.2/configuration.md index eab4733..a06fa45 100644 --- a/docs/archive/1.23.2/configuration.md +++ b/docs/archive/1.23.2/configuration.md @@ -14,41 +14,30 @@ encrypted password first. You can generate the encrypted password with the following command: -``` {.sourceCode .bash} -$ htpasswd -nb -B admin | cut -d ":" -f 2 -``` +
$ htpasswd -nb -B admin  | cut -d ":" -f 2
or if your system does not provide htpasswd you can use a docker container with the command: -``` {.sourceCode .bash} -$ docker run --rm httpd:2.4-alpine htpasswd -nbB admin | cut -d ":" -f 2 -``` +
$ docker run --rm httpd:2.4-alpine htpasswd -nbB admin "password" | cut -d ":" -f 2
-To specify the admin password from the command line, start Portainer -with the `--admin-password` flag: +To specify the admin password from the command line, start Portainer with the --admin-password flag: -``` {.sourceCode .bash} -$ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer --admin-password='$2y$05$qFHAlNAH0A.6oCDe1/4W.ueCWC/iTfBMXIHBI97QYfMWlMCJ7N.a6' -``` +
$ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer --admin-password='$2y$05$qFHAlNAH0A.6oCDe1/4W.ueCWC/iTfBMXIHBI97QYfMWlMCJ7N.a6'
### `Inside a file` -You can also store the plaintext password inside a file and use the -`--admin-password-file` flag: +You can also store the plaintext password inside a file and use the --admin-password-file flag: -``` {.sourceCode .bash} -# mypassword is plaintext here -$ echo -n mypassword > /tmp/portainer_password -$ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/portainer_password:/tmp/portainer_password portainer/portainer --admin-password-file /tmp/portainer_password -``` +
$ echo -n mypassword > /tmp/portainer_password
+ +
$ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/portainer_password:/tmp/portainer_password portainer/portainer --admin-password-file /tmp/portainer_password
This works well with Swarm & Docker secrets too: -``` {.sourceCode .bash} -# mypassword is plaintext here -$ echo -n mypassword | docker secret create portainer-pass - -$ docker service create \ +
$ echo -n mypassword | docker secret create portainer-pass -
+ +
$ docker service create \
   --name portainer \
   --secret portainer-pass \
   --publish 9000:9000 \
@@ -58,38 +47,35 @@ $ docker service create \
   --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
   portainer/portainer \
   --admin-password-file '/run/secrets/portainer-pass' \
-  -H unix:///var/run/docker.sock
-```
+  -H unix:///var/run/docker.sock
-**Note**: This will automatically create an administrator account called -**admin** with the specified password. +Note: This will automatically create an administrator account called **admin** with the specified password. Hiding specific containers -------------------------- -Portainer allows you to hide containers with a specific label by using -the `-l` flag. +Portainer allows you to hide containers with a specific label by using the -l flag. For example, take a container started with the label *owner=acme* (note that this is an example label, you can define your own labels): -``` {.sourceCode .bash} +

 $ docker run -d --label owner=acme nginx
-```
+
To hide this container, simply add the `-l owner=acme` option on the CLI when starting Portainer: -``` {.sourceCode .bash} +

 $ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer -l owner=acme
-```
+
Note that the `-l` flag can be repeated multiple times to specify multiple labels: -``` {.sourceCode .bash} +

 $ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer -l owner=acme -l service=secret
-```
+
Use your own logo ----------------- @@ -98,9 +84,9 @@ You do not like our logo? Want to make Portainer more corporate? Don't worry, you can easily switch for an external logo (it must be exactly 155px by 55px) using the `--logo` flag: -``` {.sourceCode .bash} +

 $ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer --logo "https://www.docker.com/sites/all/themes/docker/assets/images/brand-full.svg"
-```
+
Use your own templates ---------------------- @@ -126,25 +112,25 @@ template file on the file-system. By default, it points to For example, you can mount your own template file inside the container: -``` {.sourceCode .bash} +

 $ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock -v /path/to/my/templates.json:/templates.json portainer/portainer
-```
+
Or using the --template-file to specify a specific path to the templates file: -``` {.sourceCode .bash} +

 $ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock -v /path/to/template/folder:/templates portainer/portainer --template-file /templates/templates.json
-```
+
### Host your template file Using the --templates flag you can specify an URL where the template file can be accessed via HTTP. -``` {.sourceCode .bash} +

 $ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer --templates http://my-host.my-domain/templates.json
-```
+
For more information about hosting your own template definitions see Templates \ @@ -161,9 +147,9 @@ and specify the path to the JSON file in the container. Note: when using the external endpoint management, endpoint management will be disabled in the UI. -``` {.sourceCode .bash} +

 $ docker run -d -p 9000:9000 -p 8000:8000 -v /tmp/endpoints:/endpoints portainer/portainer --external-endpoints /endpoints/endpoints.json
-```
+
For more information about the endpoint definition format see External endpoints \ diff --git a/docs/archive/1.23.2/deployment.md b/docs/archive/1.23.2/deployment.md index edd3e4a..9209808 100644 --- a/docs/archive/1.23.2/deployment.md +++ b/docs/archive/1.23.2/deployment.md @@ -174,7 +174,7 @@ Portainer. Here is an example compose file: -``` {.sourceCode .yaml} +

 version: '2'
 
 services:
@@ -191,7 +191,7 @@ services:
 
 volumes:
   portainer_data:
-```
+
[Click here](https://downloads.portainer.io/docker-compose.yml) to download the Compose file. diff --git a/docs/archive/1.23.2/external_endpoints.md b/docs/archive/1.23.2/external_endpoints.md index c816514..30d565f 100644 --- a/docs/archive/1.23.2/external_endpoints.md +++ b/docs/archive/1.23.2/external_endpoints.md @@ -6,7 +6,7 @@ External endpoint definitions are written in JSON. It must consist of an array with every endpoint definition consisting of one element. -``` {.sourceCode .json} +

 [
   {
     "Name": "my-first-endpoint",
@@ -22,7 +22,7 @@ one element.
     "TLSKey": "/tmp/key.pem"
   }
 ]
-```
+
Endpoint definition format -------------------------- @@ -31,7 +31,7 @@ An endpoint element must be a valid [JSON](http://www.json.org/) object. Example: -``` {.sourceCode .json} +

 {
   "Name": "my-secure-endpoint",
   "URL": "tcp://myendpoint.mydomain:2375",
@@ -40,7 +40,7 @@ Example:
   "TLSCert": "/tmp/cert.pem",
   "TLSKey": "/tmp/key.pem"
 }
-```
+
It is composed of multiple fields, some mandatory and some optionals. @@ -118,4 +118,4 @@ When using external endpoint management, endpoint management will via the UI will be disabled to avoid any possible configuration overwrite (the endpoints view is still accessible but will only display the list of endpoints without giving the possibility to create/update endpoints). -A simple warning message will be displayed in the endpoints view. +A simple warning message will be displayed in the endpoints view. \ No newline at end of file diff --git a/docs/archive/1.23.2/templates.md b/docs/archive/1.23.2/templates.md index 36b817c..dcef3b0 100644 --- a/docs/archive/1.23.2/templates.md +++ b/docs/archive/1.23.2/templates.md @@ -13,7 +13,7 @@ A template element must be a valid [JSON](http://www.json.org/) object. Example of a container template: -``` {.sourceCode .json} +

 {
   "type": 1,
   "title": "Nginx",
@@ -25,7 +25,7 @@ Example of a container template:
     "443/tcp"
   ]
 }
-```
+
It is composed of multiple fields, some mandatory and some optionals. @@ -66,11 +66,11 @@ This field is **optional**. Example: -``` {.sourceCode .json} +

 {
   "administrator_only": true
 }
-```
+
### `name` @@ -100,11 +100,11 @@ This field is **optional**. Example: -``` {.sourceCode .json} +

 {
   "command": "/bin/bash -c \"echo hello\" && exit 777"
 }
-```
+
### `env` @@ -119,7 +119,7 @@ This field is **optional**. Element format: -``` {.sourceCode .json} +

 {
   "name": "the name of the environment variable, as supported in the container image (mandatory)",
   "label": "label for the input in the UI (mandatory unless set is present)",
@@ -128,11 +128,11 @@ Element format:
   "preset": "boolean. If set to true, the UI will not generate an input (optional)",
   "select": "an array of possible values, will generate a select input (optional)"
 }
-```
+
Example: -``` {.sourceCode .json} +

 {
   "env": [
     {
@@ -168,7 +168,7 @@ Example:
     }
   ]
 }
-```
+
### `network` @@ -180,11 +180,11 @@ This field is **optional**. Example: -``` {.sourceCode .json} +

 {
   "network": "host"
 }
-```
+
### `volumes` @@ -201,7 +201,7 @@ This field is **optional**. Example: -``` {.sourceCode .json} +

 {
   "volumes": [
     {
@@ -214,7 +214,7 @@ Example:
     }
   ]
 }
-```
+
### `ports` @@ -232,11 +232,11 @@ This field is **optional**. Example: -``` {.sourceCode .json} +

 {
   "ports": ["8080:80/tcp", "443/tcp"]
 }
-```
+
### `labels` @@ -248,7 +248,7 @@ This field is **optional**. Example: -``` {.sourceCode .json} +

 {
   "labels": [
     { "name": "com.example.vendor", "value": "Acme" },
@@ -256,7 +256,7 @@ Example:
     { "name": "com.example.version", "value": "1.0" }
   ]
 }
-```
+
### `privileged` @@ -265,11 +265,11 @@ default to false if not specified. This field is **optional**. -``` {.sourceCode .json} +

 {
   "privileged": true
 }
-```
+
### `interactive` @@ -278,11 +278,11 @@ flags). Boolean, will default to false if not specified. This field is **optional**. -``` {.sourceCode .json} +

 {
   "interactive": true
 }
-```
+
### `restart_policy` @@ -296,11 +296,11 @@ following: This field is **optional**. Will default to `always` if not specified. -``` {.sourceCode .json} +

 {
   "restart_policy": "unless-stopped"
 }
-```
+
### `hostname` @@ -308,11 +308,11 @@ Set the hostname of the container. This field is **optional**. Will use Docker default if not specified. -``` {.sourceCode .json} +

 {
   "hostname": "mycontainername"
 }
-```
+
### `note` @@ -323,11 +323,11 @@ Supports HTML. This field is **optional**. -``` {.sourceCode .json} +

 {
   "note": "You can use this field to specify extra information. 
It supports HTML." } -``` +
### `platform` @@ -337,11 +337,11 @@ Portainer UI. This field is **optional**. -``` {.sourceCode .json} +

 {
   "platform": "linux"
 }
-```
+
### `categories` @@ -351,11 +351,11 @@ categories. This field is **optional**. -``` {.sourceCode .json} +

 {
   "categories": ["webserver", "open-source"]
 }
-```
+
Stack template definition format -------------------------------- @@ -364,7 +364,7 @@ A template element must be a valid [JSON](http://www.json.org/) object. Example of a stack template: -``` {.sourceCode .json} +

 {
   "type": 2,
   "title": "CockroachDB",
@@ -378,7 +378,7 @@ Example of a stack template:
     "stackfile": "stacks/cockroachdb/docker-stack.yml"
   }
 }
-```
+
It is composed of multiple fields, some mandatory and some optionals. @@ -416,21 +416,21 @@ well as the path to the Compose file inside the repository. Element format: -``` {.sourceCode .json} +

 {
   "url": "URL of the public git repository (mandatory)",
   "stackfile": "Path to the Compose file inside the repository (mandatory)",
 }
-```
+
Example: -``` {.sourceCode .json} +

 {
   "url": "https://github.com/portainer/templates",
   "stackfile": "stacks/cockroachdb/docker-stack.yml"
 }
-```
+
This field is **mandatory**. @@ -442,11 +442,11 @@ This field is **optional**. Example: -``` {.sourceCode .json} +

 {
   "administrator_only": true
 }
-```
+
### `name` @@ -473,7 +473,7 @@ This field is **optional**. Element format: -``` {.sourceCode .json} +

 {
   "name": "the name of the environment variable, as supported in the container image (mandatory)",
   "label": "label for the input in the UI (mandatory unless set is present)",
@@ -482,11 +482,11 @@ Element format:
   "preset": "boolean. If set to true, the UI will not generate an input (optional)",
   "select": "an array of possible values, will generate a select input (optional)"
 }
-```
+
Example: -``` {.sourceCode .json} +

 {
   "env": [
     {
@@ -522,7 +522,7 @@ Example:
     }
   ]
 }
-```
+
### `note` @@ -533,11 +533,11 @@ Supports HTML. This field is **optional**. -``` {.sourceCode .json} +

 {
   "note": "You can use this field to specify extra information. 
It supports HTML." } -``` +
### `platform` @@ -547,11 +547,11 @@ Portainer UI. This field is **optional**. -``` {.sourceCode .json} +

 {
   "platform": "linux"
 }
-```
+
### `categories` @@ -561,11 +561,11 @@ categories. This field is **optional**. -``` {.sourceCode .json} +

 {
   "categories": ["webserver", "open-source"]
 }
-```
+
Build and host your own templates --------------------------------- @@ -582,13 +582,13 @@ Clone the [Portainer templates repository](https://github.com/portainer/templates), edit the templates file, build and run the container: -``` {.sourceCode .bash} + {.sourceCode .bash} $ git clone https://github.com/portainer/templates.git portainer-templates $ cd portainer-templates # Edit the file templates.json $ docker build -t portainer-templates . $ docker run -d -p "8080:80" portainer-templates -``` + Now you can access your templates definitions at `http://docker-host:8080/templates.json`. @@ -596,6 +596,6 @@ Now you can access your templates definitions at You can also mount the `templates.json` file inside the container, so you can edit the file and see live changes: -``` {.sourceCode .bash} + {.sourceCode .bash} $ docker run -d -p "8080:80" -v "${PWD}/templates.json:/usr/share/nginx/html/templates.json" portainer-templates -``` + diff --git a/docs/archive/1.23.2/troubleshooting.md b/docs/archive/1.23.2/troubleshooting.md index ce4394d..cd3ca8f 100644 --- a/docs/archive/1.23.2/troubleshooting.md +++ b/docs/archive/1.23.2/troubleshooting.md @@ -16,7 +16,7 @@ correctly on your system. The above command should have returned information about Docker running on your system. Below is a snippet of what this may look like. -``` {.sourceCode .bash} +

 $ Client: Docker Engine - Community
     Version:           19.03.3
     API version:       1.40
@@ -25,7 +25,7 @@ $ Client: Docker Engine - Community
     Built:             Tue Oct  8 00:59:59 2019
     OS/Arch:           linux/amd64
     Experimental:      false
-```
+
Ensuring Docker Swarm is configured correctly ---------------------------------------------