https://github.com/benhid/go-agent
A tiny web-server to run functions inside containers.
https://github.com/benhid/go-agent
docker golang http-server reverse-proxy
Last synced: 2 months ago
JSON representation
A tiny web-server to run functions inside containers.
- Host: GitHub
- URL: https://github.com/benhid/go-agent
- Owner: benhid
- License: mit
- Created: 2022-04-25T13:53:17.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-25T13:53:46.000Z (about 3 years ago)
- Last Synced: 2025-02-13T09:37:03.538Z (4 months ago)
- Topics: docker, golang, http-server, reverse-proxy
- Language: Go
- Homepage:
- Size: 29.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## agent 🍚
[](https://goreportcard.com/report/github.com/benhid/go-agent)
[](LICENSE)A tiny web-server (reverse proxy) to run functions for every incoming HTTP request.

## Get started
### Build
To build the agent:
```bash
docker build -t benhid/go-agent .
```Every container needs to embed this binary and use it as `CMD`, e.g.:
```Dockerfile
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](python3/Dockerfile). Build with:
```bash
cd python3
docker build -t hello-python .
```And run:
```bash
docker run -p 8090:80 hello-python
```### Usage
```bash
curl http://0.0.0.0:8090/ -d "hello world"
```