The repo contains Docker and Dip configuration for developing Ruby MRI.
- Clone Ruby to next to this project's folder:
git clone https://github.com/ruby/ruby.git ../ruby
If you want to keep Ruby source code in the different location, create a dip.override.yml
file with following contents:
# dip.override.yml
environment:
RUBY_SRC_PATH: "relative/path/to/ruby"
-
Install Dip
-
Provision the dev container and volumes:
dip provision
- Run make tasks with Dip:
dip make
# for example, to run pattern matching tests
dip make test-all TESTS='test/ruby/test_pattern_matching.rb'
- Login into the container:
dip bash
- (Optionally for VS Code users) Run container in the background and connect to it via Remote Containers feature:
dip up -d dev
# go to Remote-Container: Attach to Running Container...
# and chooose ruby_dev_1
Inspired by @kirs post "Contributing to Ruby MRI". The main difference is that the setup from this repo is IDE-agnostic (and at the same time plays well with VS Code Remote Containers).