-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add Dockerfile to support running in a container #135
Conversation
I was just thinking last week this would be useful, but hadn't had a chance to look into creating the dockerfile yet. I tested this out and it works for me. Tested both by pulling the image from dockerhub or building it directly from the dockerfile. By no means am I a docker expert though. One issue, I don't think it installs linguist in the expected way for repolinter.
From a quick look at the code and running the shell on the docker image, maybe it is expecting it installed as "linguist" when it's installed by this docker file as "github-linguist". |
Looks like this was recently changed: github-linguist/linguist#4208 |
Fixed for linguist command in c13fe49. I'll open a separate PR for that since it needs fixed anyway. |
The multi-stage build is a really slick way of dealing with needing ruby and node. I have a Dockerfile branch of this repo I haven't pushed yet, and I was using asdf to install both. Either way, I'm happy to see other folks see the value of having a Dockerfile in projects like this. Going about adding Dockerfiles may be what I do for #hacktoberfest... |
I got this down to 181MB. I think that's pretty good considering all the dependencies (ruby & node runtimes, git, gems & npm packages).
I added some docs in the Dockerfile. If you want to publish a docker image as part of the release process, it might also be worth adding it in the README. |
@@ -0,0 +1,41 @@ | |||
# To build: |
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.
This would probably be good to have in the top level README as well.
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.
I agree, though I think it is good enough to merge for now.
It might be cool to push an image from this out to DockerHub. Then anyone could |
Looks like I got a little too aggressive with pruning dependencies:
|
The error ☝️ has been fixed. |
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.
I like it! Just downloaded your fork and ran it. Works great!!!
Motivation
Between Licensee and Linguist, there are a lot of dependencies needed to get
repolinter
working to its fullest potential.Proposed Changes
This PR adds a
Dockerfile
which builds both the Ruby and Node dependencies.Usage:
Test Plan
Ideally, you could build and run the tests via Docker on Travis CI.
TODO: