Skip to content

Commit 88da274

Browse files
zainkhalidshockey
authored andcommitted
improve(readme): docker instructions (#1640)
* Adding directions on how to use the docker image * `Docker support` -> `Docker`
1 parent dcc22f2 commit 88da274

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,41 @@ To help with the migration, here are the currently known issues with 3.X. This l
4646
- The integration with the codegen is still missing.
4747
- Importing specs from a URL is not implemented.
4848

49+
## Docker
50+
51+
### Running the image from DockerHub
52+
There is a docker image published in [DockerHub](https://hub.docker.com/r/swaggerapi/swagger-editor/).
53+
54+
To use this, run the following:
55+
56+
```
57+
docker pull swaggerapi/swagger-editor
58+
docker run -d -p 80:8080 swaggerapi/swagger-editor
59+
```
60+
61+
This will run swagger-editor (in detached mode) on port 80 on your machine, so you can open it by navigating to `http://localhost` in your browser.
62+
63+
### Building and running an image locally
64+
65+
To build and run a docker image with the code checked out on your machine, run the following from the root directory of the project:
66+
67+
```
68+
# Install npm packages (if needed)
69+
npm install
70+
71+
# Build the app
72+
npm run build
73+
74+
# Build an image
75+
docker build -t swagger-editor .
76+
77+
# Run the container
78+
docker run -d -p 80:8080 swagger-editor
79+
80+
```
81+
82+
You can then view the app by navigating to `http://localhost` in your browser.
83+
4984
## Security contact
5085

5186
Please disclose any security-related issues or vulnerabilities by emailing [[email protected]](mailto:[email protected]), instead of using the public issue tracker.

0 commit comments

Comments
 (0)