Redoc CE is available as a pre-built Docker image in Docker Hub.
Make sure you have Docker installed.
- Pull the image with the following command:
docker pull redocly/redoc- Run the image:
docker run -p 8080:80 redocly/redocThe preview starts on port 8080, based on the port used in the command. You can access the preview at http://localhost:8080.
To exit the preview, press control+C.
By default, Redoc CE starts with a demo Swagger Petstore OpenAPI description file located at http://petstore.swagger.io/v2/swagger.json.
To change the description URL:
- Pass the URL to your description in the
SPEC_URLenvironment variable.
For example:
docker run -p 8080:80 -e SPEC_URL=https://api.example.com/openapi.json redocly/redocYou can also create a Dockerfile with predefined environment variables. Check out a sample Dockerfile in our code repo.
- Redoc CE deployment guide - Follow step-by-step instructions for setting up your Redoc CE project