Public Repository

Last pushed: 2 days ago
Short Description
A simple docker container for hosting swagger-ui
Full Description

Supported tags

The v3.x tag series supports the Swagger / OpenAPI Specification 2.0 only. If you need 1.x support, please use the 2.x series.

  • latest based on master
  • v3.0.5
  • v2.2.9

For more information about this image and the functionality it provides, please see the swagger-ui GitHub repository.

Usage

Expose port 8080 from the image and load the swagger-ui on the exposed port. You can then access the web service directly from the swagger-ui or via API.

Example

docker pull swaggerapi/swagger-ui

docker run -p 80:8080 swaggerapi/swagger-ui

You can now open swagger-ui on your machine via 80:

open http://localhost

For latest, and post v3.0.5 tags, you can specify the default swagger-ui to load in the UI:

docker run -p 80:8080 -e API_URL=http://generator.swagger.io/api/swagger.json swaggerapi/swagger-ui
Docker Pull Command
Owner
swaggerapi

Comments (6)
bwahlen
2 months ago

I am confused about the version. I pulled swaggerapi/swagger-ui:v3.0.17 and docker images says v3.0.17 but echo $VERSION still returns v2.2.10. This is very confusing especially when working with tag latest.

romainlho
2 months ago

Hi.
I don't find any document on how to run swagger-ui in HTTPS. I want to reach my swagger-ui with https://...
Can you help me please?
Thanks!

ktamas77
3 months ago

it seems to be the API_URL works only with the github version at the moment, but not with the docker hub version. maybe docker hub needs to be updated with the latest.

christianbudde
3 months ago

It worked with version 3.0.8 for me.

christianbudde
3 months ago

rena, I believe this is related to this issue: https://github.com/swagger-api/swagger-ui/issues/3045 Try with another version.

renra
3 months ago

Hey, is the API_URL envvar supposed to be the one I see when I open the page? Does not work for me.