{"id":13580295,"url":"https://github.com/autosoft-dev/tree-sitter-docker","last_synced_at":"2026-02-18T16:30:18.834Z","repository":{"id":76152536,"uuid":"242997841","full_name":"autosoft-dev/tree-sitter-docker","owner":"autosoft-dev","description":"A docker image with all the necessary libaries you need to build tree-sitter .so files","archived":false,"fork":false,"pushed_at":"2020-05-22T09:17:28.000Z","size":3,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-31T02:15:06.454Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/autosoft-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-02-25T12:46:21.000Z","updated_at":"2024-10-31T14:51:38.000Z","dependencies_parsed_at":"2024-01-16T20:29:03.420Z","dependency_job_id":"73cc7af6-fbf0-4767-8956-0cd8ac2ea4bc","html_url":"https://github.com/autosoft-dev/tree-sitter-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autosoft-dev%2Ftree-sitter-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autosoft-dev%2Ftree-sitter-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autosoft-dev%2Ftree-sitter-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autosoft-dev%2Ftree-sitter-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/autosoft-dev","download_url":"https://codeload.github.com/autosoft-dev/tree-sitter-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239832635,"owners_count":19704608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:01:49.604Z","updated_at":"2026-02-18T16:30:18.764Z","avatar_url":"https://github.com/autosoft-dev.png","language":"Dockerfile","readme":"# tree-sitter-docker\nA docker image with all the necessary libaries you need to build tree-sitter .so files\n\n\n### Pre-text\n\nWe at [CodistAI](https://codist-ai.com/) use [tree-sitter](http://tree-sitter.github.io/tree-sitter/) a lot. \nNow, it depends on [clang](https://llvm.org/) to be able to function properly. When one of our team-mate used Ubuntu, they found it\nhard to compile some of the tree-sitter libaries (Following the instructions [here](https://github.com/tree-sitter/py-tree-sitter)) So, this little Dockerfile will let you install all the needed dependencies and then bring you right \ninside a iPython prompt where you can run the example code and build the libraries. \n\n### Building the docker image\n\nGit clone this repo and then `cd` to it.\n\nThen use the following command to build the image\n\n```\ndocker build -t ubuntu-clang-image .\n```\n\n### Using the image\n\n- Go to any directory. (For the sake of this example we assume that you created a directory tree like `docker_llvm/tree_sitter_libs` and you are the `docker_llvm` level)\n\n- Run\n```\ndocker run -it -v $PWD/tree_sitter_libs:/tree_sitter_libs --name ubuntu_clang ubuntu-clang-image\n```\n\n- You will be right in the middle of an iPython prompt.\n\n- You will need to clone some of the tree-sitter libs. So let's say something like this \n\n```\n\u003e\u003e\u003e !git clone https://github.com/tree-sitter/tree-sitter-python\n\u003e\u003e\u003e !git clone https://github.com/tree-sitter/tree-sitter-php\n```\n\n- Once done, you should be able to use the following code to build the .so file\n```\nfrom tree_sitter import Language, Parser\n\nLanguage.build_library(\n  # Store the library in the `tree_sitter_libs` directory\n  'tree_sitter_libs/my-languages.so',\n\n  # Include one or more languages\n  [\n    'tree-sitter-php',\n    'tree-sitter-python'\n  ]\n)\n```\n\n- Voila! you will have your .so in the `tree_sitter_libs` directory, ready to be used. ","funding_links":[],"categories":["Dockerfile"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautosoft-dev%2Ftree-sitter-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautosoft-dev%2Ftree-sitter-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautosoft-dev%2Ftree-sitter-docker/lists"}