Open kachkaev opened 5 years ago
We could probably go for a first Ubuntu-based image and improve it (reduce its size) later if necessary. @lildude @Alhadis What do you think?
We could probably go for a first Ubuntu-based image and improve it (reduce its size) later if necessary. @lildude @Alhadis What do you think?
I suspect we can go straight for Alphine or similar as the requirements are pretty small.
My only reservation is around the publishing of a GitHub officially sanctioned and supported docker image on Docker Hub or even GitHub Package Registry (GPR).
This statement from @kachkaev is what raises this concern:
Some companies do not allow use of non-official docker images as they are more likely to contain unsafe code. The official image is not only trustworthy, but is also more likely to be constantly maintained.
This is going to need clearance from GitHub Product and an owner/supporter etc will need to be found as it may have legal implications. At the moment Linguist's "ownership" within GitHub is in flux. Having a community maintained and updated image would work but may put that requirement into question for some companies.
I have no problem starting with adding a Dockerfile though.
This issue has been automatically marked as stale because it has not had activity in a long time. If this issue is still relevant and should remain open, please reply with a short explanation (e.g. "I have checked the code and this issue is still relevant because ___."). Thank you for your contributions.
I have checked the code and this issue is still relevant because an official docker image is still not available
ping @lildude. would you be interested in crafting one?
ping @lildude. would you be interested in crafting one?
I assume you mean Dockerfile. I can, but I won't be able to get to it until about the middle of October at the earliest.
@lildude
I added Dockerfile based on ruby:alpine
, please review https://github.com/github/linguist/pull/4687
I stumbled on someone else making a docker image for this: https://github.com/crazy-max/docker-linguist
I'm using it without complaints, thought others might want find it useful.
@arkban that's the one mentioned in the OP 😉
Reminds me, I still need to finish looking into that.
@arkban that's the one mentioned in the OP 😉
Apologies! Firefox find you've failed me for the 58294th time!
https://github.com/github/linguist/pull/4687 has ben merged. Closing.
@lildude glad to see the official Dockerfile! WDYT of publishing the image on Dockerhub (https://hub.docker.com/) for ease of access? Pretty much all dockerized projects share their images this way. Until that's done, using linguist via docker in CI is still challenging – one needs to create a non-official image, publish it somewhere and only then use.
It'd be great if we could keep this issue open till that's sorted.
As I mentioned before, I'm reluctant to publish a formal image and the state of Linguist's internal ownership is still in flux so I'm not likely to get sanctioning any time soon.
I'll re-open the issue for tracking, but don't expect this image any time soon.
Guys! i can offer centralized image using my software: https://github.com/abdennour/dockerfiles However, i prefer to maintain it here. Our main concern is to get the image as a service.
enjoy now! http://hub.docker.com/r/abdennour/linguist
I managed to find an alternative solution to using a docker image. @Nixinova ported linguist to JavaScript, the source is here: https://github.com/Nixinova/Linguist. The npm package is called linguist-js
.
So now we can run npx linguist-js
on any machine that has Node.js 🎉
Please note that this is not an official port, i.e. a completely different codebase by an independent author. Project goal is the same though and the results are similar.
How about mentioning the port in README?
Preliminary Steps
Please confirm you have...
considered implementing an override,Problem Description
I'm using linguist from a Node.js project and have almost zero knowledge in Ruby, Ruby Gem and so on. To me
github-linguist
is just a CLI command I know how to call.Installing
github-linguist
locally on Mac OS is not a big deal, however this becomes quite a challenge if I want to call the same command from CI. We use Azure DevOps, in which hosted agents do not come with Ruby. This means that every time I want to run a JavaScript command that depends ongithub-linguist
I need to start the CI Job with this:Note that the task called Install linguist takes nearly 10 minutes. This is a simple call of
gem install github-linguist
.It would be great if
github-linguist
was made available as an official docker image that I could invoke instead of obtaining Ruby and callinggem install
. The CLI command would look something like:Pulling a docker image and spinning a one-off docker container would take seconds, so a lot of CI time would be saved.
There already exists a third-party docker wrapper for linguist (published at
crazymax/linguist
), but I believe the official version would be a much better thing to have for the community. Some companies do not allow use of non-official docker images as they are more likely to contain unsafe code. The official image is not only trustworthy, but is also more likely to be constantly maintained.WDYT of publishing an official image to https://hub.docker.com/_/github-linguist?
URL of the affected repository:
Any