-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker support #163
base: master
Are you sure you want to change the base?
Docker support #163
Conversation
Sync fork - support object in query params
I have an example of a multi-stage Dockerfile here: https://github.com/mithun/swaggen-docker/blob/master/Dockerfile |
Thanks for this example @mithun, good suggestion! |
@@ -69,6 +69,16 @@ import SwagGenKit | |||
import Swagger | |||
``` | |||
|
|||
## Docker | |||
|
|||
`airtasker/swaggen` image acts as a standalone executable. It can be used as an alternative to installing via homebrew, or for developers who are unable to install Xcode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to be referencing airtasker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't. As a user of the docker image, I will not trust it unless it is published by @yonaskolb , which is why I'm building my own
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
I do think that having a first party Docker image is crucial for (CI use for exemple).
So I build did my own Docker image by forking @mithun(great) Docker image.
I have made a couple of tweaks from @mithun(great) Docker image:
- updating it to the latest version of Swift
- making it generate image with Swift slim image - 4.2.0(467.93 MB) -> 4.2.0-slim(77.05 MB) 83% smaller 😱
- add a bunch of variable to make it easy to generate images for various tag of my fork of SwagGen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a few months of working with Swaggen in a Docker container I do prefer this workflow. Because it guarantees that it is working the same way as our CI is working. With one script anyone(back/front end dev) in the team can generate a custom version of the library. It's easier to maintain and update. FWIW I do update my Swaggen image for every new Swift build.
Last update was this morning with Swift 5.1.5 it's pretty easy to do.
@mithun Can your https://github.com/mithun/swaggen-docker take all the same parameter as the official binary ? |
Yes |
Solves #160
Changes: