functions
functions copied to clipboard
Using PHP
Hello Is it possible that I create a function with PHP instead of Python ?
Yes, you can use any language that you can run inside a docker container.
Please check PHP Hello example.
I'd like to run it on Kubernetes directly. Is it possible to run on Kubernetes without docker container?
I'm sorry, I don't understand what you mean by "Running on Kubernetes directly".
Kubernetes is a container orchestration platform, so you will need to use some kind of containerization technology to run your function.
At the moment, Iron Functions support only Docker containers. It is possible to support other containerization platforms, but currently there are no projects underway.
I have create the func.yaml
file:
name: my_docker_username/hello
version: 0.0.1
path: /hello
build:
- docker run --rm -v "$PWD":/worker -w /worker iron/php:dev composer install
When I had run fn build
, I gave the error:
error running command docker run --rm -v "$PWD":/worker -w /worker iron/php:dev composer install (exit status 1)
What is wrong?