Skip to content
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

Added Dockerfile #671

Merged
merged 1 commit into from
Apr 13, 2020
Merged

Added Dockerfile #671

merged 1 commit into from
Apr 13, 2020

Conversation

itinance
Copy link
Contributor

Describe the PR

I provided a Dockerfile that enables us to use a precompiled swag-binary in Dockerfiles for Swagger-Doc generation Automation.

Relation issue
No issue.

Additional context
I've built an image and pushed it to DockerHub. Now we can use it like this in a Dockerfile:

COPY --from=itinance/swag /root/swag /usr/local/bin

@codecov-io
Copy link

codecov-io commented Apr 11, 2020

Codecov Report

Merging #671 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #671   +/-   ##
=======================================
  Coverage   84.98%   84.98%           
=======================================
  Files           7        7           
  Lines        1805     1805           
=======================================
  Hits         1534     1534           
  Misses        172      172           
  Partials       99       99           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b82b47...514639a. Read the comment docs.

Copy link
Contributor

@ubogdan ubogdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ubogdan ubogdan merged commit ccc5ab2 into swaggo:master Apr 13, 2020
@OneCricketeer
Copy link

@itinance Is that image pushed anywhere other than your private repo?

@itinance itinance deleted the containerization branch April 30, 2021 07:21
@itinance
Copy link
Contributor Author

@itinance Is that image pushed anywhere other than your private repo?

I don't know. In my company we use our own image that you have mentioned :)

@OneCricketeer
Copy link

I see. So, is your DockerHub version maintained with the latest commits to this repo or should there be a Github action to do so?

@OneCricketeer
Copy link

In the meantime, I've done

docker run --rm -v `pwd`:/work golang:1.15-alpine3.13 \
  sh -c "apk update && apk add --no-cache git; go get -u github.com/swaggo/swag/cmd/swag && (cd /work; swag init)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants