Skip to main content

How to use the Redoc Docker image

Redoc is available as a pre-built Docker image in Docker Hub.

Quick Start

1

Pull the image with the following command:

docker pull redocly/redoc
2

Then run the image:

docker run -p 8080:80 redocly/redoc

Custom API Specification

By default, Redoc starts with a demo Swagger Petstore OpenAPI definition located at http://petstore.swagger.io/v2/swagger.json. You can update this URL using the environment variable SPEC_URL. For example:
docker run -p 8080:80 -e SPEC_URL=https://api.example.com/openapi.json redocly/redoc

Custom Configuration

Create a Dockerfile

You can also create a Dockerfile with some predefined environment variables. Check out a sample Dockerfile in our code repo.