-
Notifications
You must be signed in to change notification settings - Fork 30
Setting Up Binder Development
Follow these instructions to get Binder running locally on your computer for testing and development!
This guide assumes you are familiar with creating folders in your operating system's terminal and have git installed (Run git --version from the command line to check)
Fork Binder using the "Fork" Button in the top right of the Github screen, and clone your forked repository
git clone https://github.com/link_to/your_binder
Binder uses Docker to manage dependencies and make setting up your development environment easier! If you don't already have docker on your computer, visit https://www.docker.com/ to download Docker Desktop.
Then, before the first time running Binder you need to build the Binder Docker image that includes all of the code and dependencies required to run Binder using docker-compose build.
Once the Binder Docker image has been built, start the Binder image by running
docker-compose up --watch
After a few seconds, Binder should be running at http://localhost:3000/!
Occasionally, we want to run other commands related to Binder for testing (e.g. rails console). You can run any traditional rails command by running
docker-compose exec web COMMAND_NAME.
For MacOS or Linux users, it may be worthwhile to alias docker-compose exec web since you may need to use it a lot. To do this:
-
vim ~/.bashrcto edit your terminal preferences - At the bottom of the file (press 'i' to edit the file), add
alias binder='docker-compose exec web - Exit the file by typing Esc + ':' + 'w' + 'q' + Enter
-
source ~/.bashrcto load the changes to your current terminal session. - Now just run
binder COMMAND_NAMEto run commands!