Skip to content

10htts/Docker-faas

Docker FaaS

Docker-native Function-as-a-Service (FaaS) gateway compatible with OpenFaaS and faas-cli. Run functions on Docker without Kubernetes.

Highlights

  • OpenFaaS-compatible API and faas-cli workflows
  • Scale-from-zero: functions auto-start on invocation
  • Web UI for deploy, monitor, logs, secrets, and debug
  • Source packaging (zip/Git) and builder templates
  • Security hardening: cap drop, no-new-privileges, per-function networks
  • Prometheus metrics and structured logging

Quick Start

Prerequisites

  • Docker 20.10+
  • Docker Compose (optional)
  • faas-cli (optional, for CLI deployments)

Docker Compose

git clone https://github.com/10htts/Docker-faas.git
cd docker-faas

docker-compose up -d

curl http://localhost:8080/healthz

Web UI: http://localhost:8080/ui/

Default credentials:

  • Username: admin
  • Password: admin

Deploy a Function

Using Basic Auth

faas-cli login --gateway http://localhost:8080 --username admin --password admin

faas-cli deploy \
  --image ghcr.io/openfaas/alpine:latest \
  --name echo \
  --gateway http://localhost:8080 \
  --env fprocess="cat"

echo "Hello" | faas-cli invoke echo --gateway http://localhost:8080

Using Token Auth (Alternative)

# Obtain a token via the REST API
TOKEN=$(curl -X POST http://localhost:8080/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"admin"}' | jq -r '.token')

# Use token with faas-cli (set via environment variable)
export OPENFAAS_URL=http://localhost:8080
# Token support in faas-cli varies; use curl for direct API access:
curl -X POST http://localhost:8080/function/echo \
  -H "Authorization: Bearer $TOKEN" \
  -d "Hello"

Auth note: /function/* requires auth by default. Set REQUIRE_AUTH_FOR_FUNCTIONS=false for OpenFaaS compatibility without authentication.

Documentation

Complete Documentation Index

Quick Links

Configuration

All configuration is via environment variables. See docs/CONFIGURATION.md for the full list and defaults.

Development

make build
make test

E2E tests (requires Docker):

./scripts/run-tests.sh

Windows PowerShell:

powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\run-tests.ps1

Contributing

Contributions are welcome! Please see:

License

MIT License. See LICENSE.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors