Authenticated HTTP gateway to trigger whitelisted Docker containers or host commands on demand.
2.9K
FExec is an HTTP API service that executes pre-defined system commands or Docker container tasks on demand. It acts as a security boundary between untrusted callers and the host execution environment: only explicitly configured command aliases can be triggered, and every parameter is validated before use.
Clients call FExec over HTTP, authenticating with a JWT or API key. FExec looks up the requested alias, validates all parameters against the alias's regex rules, executes the command (on the host or in a Docker container), and returns the result. No arbitrary commands can be run — only aliases defined by the operator.
Containers that are only needed occasionally still consume memory and CPU while sitting idle. A cron job can start one on a regular schedule, and a person can start one by hand for interactive use — but neither fits functionality that needs to start on demand, triggered by an event such as a step in an automated workflow. Giving the triggering process direct access to the Docker socket solves the "on demand" problem, but grants unrestricted, unauthenticated control of the Docker daemon. FExec replaces that with a narrow, authenticated HTTP API: only pre-defined, parameter-validated aliases can be triggered.
Every action FExec's API can perform is defined as an alias — a named configuration that bundles what to run, how input/output are mapped, logging, and other execution details. Each alias runs as one of two types:
Both exchange input/output via environment variables, command-line arguments, streams, and files.
Every alias also declares a mode, mandatory and currently fixed to inline — the API call blocks until execution completes. See README.md on GitHub for details.
FExec is configured through simple files, not code. Configurable areas include:
See CONFIGURATION.md on GitHub for the full reference.
docker run -d \
-p 8080:80 \
-v $(pwd)/alias.d:/etc/fexec/alias.d:ro \
-v $(pwd)/auth.d:/etc/fexec/auth.d:ro \
jnitecki/fexec:latest
FExec reads its configuration from /etc/fexec/fexec.conf (optional — sane
defaults apply if absent), authentication files from /etc/fexec/auth.d/,
and alias definitions from /etc/fexec/alias.d/. At least one auth file and
one alias are required before FExec will accept requests. Listens on port
80 by default (443 when SSL is enabled).
See the GitHub repository for full configuration reference, alias syntax, and API documentation.
Alpine is the default OS variant — latest and X.Y.Z are Alpine-based,
identical to their -alpine-suffixed equivalents:
| Tag | Base | Notes |
|---|---|---|
latest, alpine | python:3.13-alpine | rolling, tracks the newest release |
X.Y.Z, X.Y.Z-alpine | python:3.13-alpine | pinned release |
ubuntu | python:3.13-slim | rolling |
X.Y.Z-ubuntu | python:3.13-slim | pinned release |
All tags are published as multi-arch manifests (linux/amd64 + linux/arm64).
Every published image is signed with cosign:
cosign verify --key cosign.pub docker.io/jnitecki/fexec:<tag>
cosign.pub is published in the GitHub repository's root. See SECURITY.md
for full details and vulnerability reporting.
FExec is free for personal, non-commercial use (research, learning, testing, hobby projects). Commercial use requires a separate written agreement — see LICENSE or contact TBSS Ltd.
Content type
Image
Digest
sha256:6a5b6e9c1…
Size
35.2 MB
Last updated
14 minutes ago
docker pull jnitecki/fexec:1.0.0-alpine