This is the sample petstore application
1M+
This is the server hosted at http://petstore.swagger.io. You can run it to have your own, high-performance petstore with questionable REST design practices, too.
For more information about this image and the functionality it provides, please see the swagger-samples GitHub repository.
Expose port 8080 from the image and access petstore via the exposed port. You can then add and delete pets as you see fit.
You can configure the mount point for the application (default is api):
SWAGGER_BASE_PATH=/v2
You can also configure the host that you will be serving the API on:
SWAGGER_HOST=http://petstore.swagger.io
Lastly, you can configure the URL you will accessing this API on. Please be aware that SWAGGER_URL replaces the value in SWAGGER_HOST but both should be used as they serve different purposes.
SWAGGER_URL=http://localhost
docker pull swaggerapi/petstore
docker run -d -e SWAGGER_HOST=http://petstore.swagger.io \
-e SWAGGER_URL=http://localhost \
-e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
You can now open swagger-ui on your machine via 80
Content type
Image
Digest
sha256:87d027016…
Size
143 MB
Last updated
over 2 years ago
docker pull swaggerapi/petstore