redoc/docs/deployment/docker.md
Heather Cloward 6cbd96a24a
[GSoD]Reorganizes the quickstart into a deployment guide and quickstart (#1749)
* Reorganizes the quickstart into a deployment guide and quickstart

* Minor edits

* fix: minor formatting issue

* fix: simplify phrasing

* Adds redirects, link to preview-docs docs, and other review edits

* remove IE polyfills as IE is no longer supported

Co-authored-by: Ivana Isadora Devcic <33730345+skadinna@users.noreply.github.com>
2021-11-23 16:07:56 +11:00

1.1 KiB

title redirectFrom
Using the Redoc Docker image
/docs/quickstart/docker/

Using the Redoc Docker image

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

If you have Docker installed, pull the image with the following command:

docker pull redocly/redoc

Then run the image with the following command:

docker run -p 8080:80 redocly/redoc

The preview starts on port 8080, based on the port used in the command, and can be accessed at http://localhost:8080. To exit the preview, use control+C.

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

Using a Dockerfile

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