Skip to content

epels/commandd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

commandd

Build Status

Daemon exposing the output of any arbitrary command over HTTP.

Requirements

  • Go 1.13

Configuration

The commandd daemon allows basic configuration through flags. Comes with reasonable defaults.

$ ./commandd -help
Usage of ./commandd:
  -addr string
    	Address to listen on (default ":8080")
  -pattern string
    	Pattern to serve to (default "/run")
  -timeout duration
    	Timeout for command (default 10s)

Anything after the flags is the command to execute on requesting pattern. A typical invocation looks like this:

$ ./commandd -addr=":8080" -timeout="2s" echo -n foo bar baz
$ curl http://localhost:8080/run
foo bar baz

Docker

Running in Docker is easy. First, build an image.

docker build -t some-tag .

To run a container from the freshly built image:

docker run -p 8080:8080 --rm -t some-tag

The -p flag publishes the container's port to the host.

About

Daemon exposing the output of any arbitrary command over HTTP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors