GitBook: [#1159] Remove prompts from code examples

ce-2.6
James Carppe 2021-11-22 01:09:32 +00:00 committed by gitbook-bot
parent 9dfc4cc66c
commit 4812aeec29
No known key found for this signature in database
GPG Key ID: 07D2180C7B12D0FF
1 changed files with 7 additions and 8 deletions

View File

@ -4,21 +4,20 @@ The best way to do this is to [bind-mount your own template file](../cli.md#use-
First, clone the [Portainer templates repository](https://github.com/portainer/templates), edit the templates file, then build and run the container:
```text
$ git clone https://github.com/portainer/templates.git portainer-templates
$ cd portainer-templates
```
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
docker build -t portainer-templates .
docker run -d -p "8080:80" portainer-templates
```
Access your template definitions at `http://docker-host:8080/templates.json`.
You can also mount the `templates.json` file inside the container, so you can edit the file and see live changes:
```text
$ docker run -d -p "8080:80" -v "${PWD}/templates.json:/usr/share/nginx/html/templates.json" portainer-templates
```
docker run -d -p "8080:80" -v "${PWD}/templates.json:/usr/share/nginx/html/templates.json" portainer-templates
```
For more information about the format of the app template, go [here](format.md).