Skip to content

A tiny web-server to run functions inside containers.

License

Notifications You must be signed in to change notification settings

benhid/go-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agent 🍚

Go Report Card License: MIT

A tiny web-server (reverse proxy) to run functions for every incoming HTTP request.

Get started

Build

To build the agent:

docker build -t benhid/go-agent .

Every container needs to embed this binary and use it as CMD, e.g.:

FROM benhid/go-agent as build-agent

# ...

COPY --from=build-agent /build/agent .

ENV fprocess="python3 index.py"

EXPOSE 80

CMD [ "./agent" ]

Run

You can find a template of a Python application here. Build with:

cd python3
docker build -t hello-python .

And run:

docker run -p 8090:80 hello-python

Usage

curl http://0.0.0.0:8090/ -d "hello world"