Public Repository

Last pushed: 3 years ago
Short Description
Web service providing random characters or bytes
Full Description

This image provides a web service exposed on port 80 that returns a series of random printable characters (content-type: text/plain) or of random bytes (content-type: application/octet-stream). If you want to make the service available to other hosts on your network, run the image with port 80 mapped to a host port, e.g.,

docker run -d -p 8080:80 heinlein/random

The request to the web service should be either

  • /a/<<num>> -- returns printable, non-whitespace string, or
  • /b/<<num>> -- returns binary stream

where <<num>> should be an integer from 1 to 1024.

To fetch 128 random printable characters:

curl -s

To fetch 64 random bytes:

curl -s

No guarantees are provided regarding the randomness of the data series. It works for me, but it's not /dev/random.

Docker Pull Command