https://github.com/crazy-max/docker-linguist
GitHub Linguist Docker image
https://github.com/crazy-max/docker-linguist
alpine-linux docker github linguist
Last synced: 6 months ago
JSON representation
GitHub Linguist Docker image
- Host: GitHub
- URL: https://github.com/crazy-max/docker-linguist
- Owner: crazy-max
- License: mit
- Created: 2019-03-25T09:22:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-23T15:22:33.000Z (over 1 year ago)
- Last Synced: 2024-10-18T07:32:44.752Z (12 months ago)
- Topics: alpine-linux, docker, github, linguist
- Language: HCL
- Homepage:
- Size: 157 KB
- Stars: 34
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Support: .github/SUPPORT.md
Awesome Lists containing this project
README
## About
Docker image to run [GitHub Linguist](https://github.com/github/linguist), a
library used on GitHub.com to detect blob languages.> [!TIP]
> Want to be notified of new releases? Check out 🔔 [Diun (Docker Image Update Notifier)](https://github.com/crazy-max/diun)
> project!___
* [Build locally](#build-locally)
* [Image](#image)
* [Usage](#usage)
* [Contributing](#contributing)
* [License](#license)## Build locally
```shell
git clone https://github.com/crazy-max/docker-linguist.git
cd docker-linguist# Build image and output to docker (default)
docker buildx bake# Build multi-platform image
docker buildx bake image-all
```## Image
| Registry | Image |
|--------------------------------------------------------------------------------------------------|---------------------------------|
| [Docker Hub](https://hub.docker.com/r/crazymax/linguist/) | `crazymax/linguist` |
| [GitHub Container Registry](https://github.com/users/crazy-max/packages/container/package/linguist) | `ghcr.io/crazy-max/linguist` |Following platforms for this image are available:
```
$ docker buildx imagetools inspect crazymax/linguist --format "{{json .Manifest}}" | \
jq -r '.manifests[] | select(.platform.os != null and .platform.os != "unknown") | .platform | "\(.os)/\(.architecture)\(if .variant then "/" + .variant else "" end)"'linux/386
linux/amd64
linux/arm/v6
linux/arm/v7
linux/arm64
linux/ppc64le
linux/s390x
```## Usage
The entrypoint is **github-linguist** itself:
```
$ docker run -t --rm crazymax/linguist:latest --help
Linguist v7.3.1
Detect language type for a file, or, given a repository, determine language breakdown.Usage: linguist
linguist [--breakdown] [--json]
linguist [--breakdown] [--json]
```Example with [this repository](https://github.com/portapps/portapps) cloned and analyzed by linguist:
```
$ git clone https://github.com/portapps/portapps.git
$ docker run -t --rm -v "$(pwd)/portapps:/repo" crazymax/linguist:latest
85.51% Go
10.00% Inno Setup
4.49% Shell
```## Contributing
Want to contribute? Awesome! The most basic way to show your support is to star
the project, or to raise issues. You can also support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max)
or by making a [PayPal donation](https://www.paypal.me/crazyws) to ensure this
journey continues indefinitely!Thanks again for your support, it is much appreciated! :pray:
## License
MIT. See `LICENSE` for more details.