github.com/xuqingfeng/hostname

Echo hostname of the container


License
MIT
Install
go get github.com/xuqingfeng/hostname

Documentation

hostname

Tiny HTTP service that returns the container's hostname. Built with Go, packaged on BusyBox.

Run

docker run -d -p 8000:8000 --name hostname xuqingfeng/hostname

Usage

curl 127.0.0.1:8000

Response is plain text, e.g. a1b2c3d4e5f6 (the container hostname).