The external repository must have a directory named template
at the root directory, in which there are directories
containing templates. The directory for each template can be freely named with alphanumeric characters and hyphen.
Example:
template
├── csharp
│ ├── Dockerfile
│ └── template.yml
├── dockerfile
│ ├── Dockerfile
│ └── template.yml
├── node
│ ├── Dockerfile
│ └── template.yml
├── node-armhf
│ ├── Dockerfile
│ └── template.yml
├── python
│ ├── Dockerfile
│ └── template.yml
├── python-armhf
│ ├── Dockerfile
│ └── template.yml
├── php5
│ ├── Dockerfile
│ └── template.yml
├── php7
│ ├── Dockerfile
│ └── template.yml
└── ruby
├── Dockerfile
└── template.yml
In order to build functions using 3rd party templates, you need to add 3rd templates before the build step, with the following command:
./faas-cli template pull https://github.com/itscaro/openfaas-template-php.git
If you need to update the downloaded repository, just add the flag --overwrite
to the download command:
./faas-cli template pull https://github.com/itscaro/openfaas-template-php.git --override
./faas-cli new --list