You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update Go build version for Docker container
* Explicitly specify copy target
* Set ENTRYPOINT
* Move binary to /bin
* Add docker usage instructions to the README
* Set /code as the default WORKDIR
---------
Co-authored-by: Norman Gehrsitz <git@gehrsitz.eu>
Copy file name to clipboardExpand all lines: README.md
+6-1
Original file line number
Diff line number
Diff line change
@@ -51,12 +51,17 @@ Swag converts Go annotations to Swagger Documentation 2.0. We've created a varie
51
51
52
52
1. Add comments to your API source code, See [Declarative Comments Format](#declarative-comments-format).
53
53
54
-
2.Download swag by using:
54
+
2.Install swag by using:
55
55
```sh
56
56
go install github.com/swaggo/swag/cmd/swag@latest
57
57
```
58
58
To build from source you need [Go](https://golang.org/dl/) (1.17 or newer).
59
59
60
+
Alternatively you can run the docker image:
61
+
```sh
62
+
docker run --rm -v $(pwd):/code ghcr.io/swaggo/swag:latest
63
+
```
64
+
60
65
Or download a pre-compiled binary from the [release page](https://github.com/swaggo/swag/releases).
61
66
62
67
3. Run `swag init` in the project's root folder which contains the `main.go` file. This will parse your comments and generate the required files (`docs` folder and `docs/docs.go`).
0 commit comments