By default, MyBinder looks to repositories on Github for its builds, but it can also build from Githubs gists, GitLab.com
repositories, and, well, any git repository with a networked endpoint, it seems:
What prompted me to this was looking for a way to launch a MyBinder container from Bitbucket. (For the archaeologists, there are various issues and PRs (such as here, and here, as well as this recent forum post — How to use bitbucket repositories on mybinder.org — that trace some of the history…)
So what’s the trick?
For now, you need to get hold of the URL to a particular Bitbucket repo commit. For example, to try running this repo you need to co to the Commits page and grab the URL for the most recent master commit (or whichever one you you want) which will contain the commit hash:
For example, soenthing like https://bitbucket.org/ueacomputervision/image-labelling-tool/commits/f3ddb33e4839f8a0fe73c168993b405adc13daf0
gives the commit hash f3ddb33e4839f8a0fe73c168993b405adc13daf0
.
For the repo base URL https://bitbucket.org/ueacomputervision/image-labelling-tool
, the MyBinder launch link then takes on the form:
https://mybinder.org/v2/git/https%3A%2F%2Fbitbucket.org%2Fueacomputervision%2Fimage-labelling-tool.git/f3ddb33e4839f8a0fe73c168993b405adc13daf0
which is to say:
https://mybinder.org/v2/git/ESCAPED_REPO_URL.git/COMMIT_HASH
But it does look like things may get easier in the near future…