Skip to content

containerize/docker-redoc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-redoc

License: MIT

A Docker image which serves ReDoc documentation.

To serve swagger.yaml in the current directory:

$ docker run -p 80:80 -v $(PWD)/swagger.yaml:/usr/share/nginx/html/swagger.yaml containerize/redoc

And it'll be running at http://localhost.

Example with custom runtime configuration

The following example illustrates customisation of runtime settings;

$ docker run \
  -p 80:80 \
  -v $(PWD)/swagger.json:/usr/share/nginx/html/swagger.json \
  -e PAGE_TITLE="My API docs" \
  -e SPEC_URL=swagger.json \
  -e 'REDOC_OPTIONS=hide-hostname="true" lazy-rendering'\
  containerize/redoc

Runtime configuration

This image can be configured at runtime, by setting environment variables;

  • PAGE_TITLE sets the page-title (defaults to ReDoc)
  • SPEC_URL URL of the Swagger file (defaults to swagger.yaml)
  • REDOC_OPTIONS sets <redoc> tag attributes

License

Copyright (c) 2016 Ben Firshman. Licensed under the MIT license.

About

A Docker image which serves ReDoc documentation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 62.9%
  • Shell 37.1%