How to convert your templates for 1.x to 2.0
In this help article, you will learn how to convert templates made for Portainer 1.x to Portainer 2.0.
To convert templates from Portainer 1.x to Portainer 2.0, we build a container that helps you do this conversion.
Converting templates it's very simple, you need to run a "temporary" container to do this.
First, make sure that your template name is called "templates.json", then, you need to run the container mounting two volumes. One indicating the path where your templates.json file is, and the other indicating a folder where the converted templates.json is going to be outputted.
docker run --rm -v /tmp/templates.json:/src/templates.json -v /tmp/output:/dist portainer/helper-templates
If everything works as expected, you will see the next message:
2020/08/26 00:51:27 New template file successfully created at /dist/templates-upgraded.json
In this example, we mount the container dist folder in /tmp/output of our local machine, we are going to find the converted file there.
-rwxr-xr-x 1 nacho nacho 102372 Sep 1 15:26 templates.json*
The next thing you do is upload the template to Github or host in someplace to download from Portainer.