https://github.com/palkan/ruby-dip
Docker-based development environment for hacking Ruby MRI
https://github.com/palkan/ruby-dip
docker ruby
Last synced: 3 months ago
JSON representation
Docker-based development environment for hacking Ruby MRI
- Host: GitHub
- URL: https://github.com/palkan/ruby-dip
- Owner: palkan
- Created: 2020-07-29T14:13:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-06T00:12:25.000Z (over 3 years ago)
- Last Synced: 2025-03-29T05:11:33.440Z (about 1 year ago)
- Topics: docker, ruby
- Language: Dockerfile
- Homepage:
- Size: 1.95 KB
- Stars: 30
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ruby MRI development with Docker and Dip
The repo contains Docker and [Dip][] configuration for developing Ruby MRI.
## Usage
- Clone Ruby to next to this project's folder:
```sh
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:
```yml
# dip.override.yml
environment:
RUBY_SRC_PATH: "relative/path/to/ruby"
```
- Install [Dip][]
- Provision the dev container and volumes:
```sh
dip provision
```
- Run make tasks with Dip:
```sh
dip make
# for example, to run pattern matching tests
dip make test-all TESTS='test/ruby/test_pattern_matching.rb'
```
- Login into the container:
```sh
dip bash
```
- (Optionally for VS Code users) Run container in the background and connect to it via [Remote Containers](https://code.visualstudio.com/docs/remote/attach-container) feature:
```sh
dip up -d dev
# go to Remote-Container: Attach to Running Container...
# and chooose ruby_dev_1
```
## Acknowledgments
Inspired by [@kirs][] post ["Contributing to Ruby MRI"](https://kirshatrov.com/2020/01/11/contributing-to-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).
## Resources
- [Contributing to Ruby MRI](https://kirshatrov.com/2020/01/11/contributing-to-mri/)
- [Ruby Hack challenge repo](https://github.com/ko1/rubyhackchallenge/tree/master/EN)
- [VM stacks "puts-debugging" gist](https://gist.github.com/palkan/dcab4ed0978dfe6f55f9b6533d3e80a9)
[Dip]: https://github.com/bibendi/dip
[@kirs]: https://github.com/kirs