https://github.com/victorshinya/docker-functions
Build Functions using Docker
https://github.com/victorshinya/docker-functions
container docker docker-container docker-images docker-swarm faas function-as-a-service kubernetes openfaas openfaas-function
Last synced: about 1 year ago
JSON representation
Build Functions using Docker
- Host: GitHub
- URL: https://github.com/victorshinya/docker-functions
- Owner: victorshinya
- License: mit
- Created: 2019-02-01T20:31:27.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-25T19:22:06.000Z (about 7 years ago)
- Last Synced: 2025-01-09T07:49:28.724Z (about 1 year ago)
- Topics: container, docker, docker-container, docker-images, docker-swarm, faas, function-as-a-service, kubernetes, openfaas, openfaas-function
- Language: Dockerfile
- Homepage:
- Size: 92.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://cloud.ibm.com)
[](https://developer.ibm.com/docker/)
# Build Functions using Docker
Develop and deploy new serverless applications are quite simple. Break your solution into several separate components, and then, break it again into several functions (or actions). However, there are quite a few features that require to use other programming languages or even using opensource services (such as ImageMagick), and your serverless platform does not have a native support. In this case, you need to use a Docker container to build your function.
Learn how to use Apache OpenWhisk and OpenFaaS using Docker, Docker Swarm, and Kubernetes.
## Setup your local environment
### Docker
To configure your local environment, and even, to deploy a function you need to download and install [Docker Desktop](https://www.docker.com/products/docker-desktop).
### Apache OpenWhisk on IBM Cloud platform
Download and install [IBM Cloud CLI](https://cloud.ibm.com/docs/cli/reference/ibmcloud?topic=cloud-cli-install-ibmcloud-cli#install-ibmcloud-cli) and [IBM Cloud Functions CLI](https://cloud.ibm.com/openwhisk/learn/cli) to build your functions on IBM Cloud platform. If you want to use the standard [Apache OpenWhisk CLI](https://openwhisk.apache.org/documentation.html#wsk-cli), you can access the link and download the `wsk-cli`.
### OpenFaaS
To install and configure [OpenFaaS](https://openfass.com), you need to install [Docker](https://github.com/victorshinya/docker-functions#docker) in your local machine.
```sh
curl -sSL https://raw.githubusercontent.com/openfaas/faas/master/docker-compose.yml | grep image | awk -F " " '{print $NF}' | xargs -L1 docker pull
```
Setup a single-node cluster.
```sh
docker swarm init
```
Create an account on [Docker Hub](https://hub.docker.com/) and log in.
```sh
docker login
```
Download and install [OpenFaaS CLI](https://openfaas.com).
```sh
curl -sL cli.openfaas.com | sudo sh
```
## Samples
Follow both samples in this repository:
- [Sample C prograaming language on IBM Cloud Functions](https://github.com/victorshinya/docker-faas/blob/master/c-lang#README.md)
- [ImageMagick service on OpenFaaS](https://github.com/victorshinya/docker-faas/blob/master/imagemagick#README.md)
## License
MIT License
Copyright (c) 2018 Victor Kazuyuki Shinya