Ruby Hacker Box
The Ruby Hacker Box is meant to make it easy for new Ruby hackers to get started hacking Ruby very quickly.
- For the time being, documentation and scripts exists only for Unix shells.
You have two options to install: running the boostrap script or manually following the install instructions.
You can get started by just pasting the following line in your command line:
curl -s https://raw.githubusercontent.com/davidstosik/mri-dev-docker/master/bootstrap.sh | sh /dev/stdin
- Clone this repository.
git clone https://github.com/davidstosik/mri-dev-docker.git
- Clone the Ruby source repository inside this repository.
git clone https://github.com/ruby/ruby.git mri-dev-docker/ruby
You can also copy your own ruby source folder in
mri-dev-docker if you
already have it.
- Run the setup script
cd mri-dev-docker ./setup.sh
You can open a Bash prompt in the Docker container you just built by using the start script:
(This is just a shortcut to run the
docker run command with the proper
They are organised as follows:
/ ├── ruby/ └── workdir/ ├── build/ ├── install/ └── ruby -> /ruby
/ruby/contains the Ruby source code, as a Docker volume mounted from the host's
rubydirectory that was checked out from GitHub during setup
/workdir/is your working directory, containing:
*.oand other artifacts)
install/directory (in which you can find the compiled
- a symbolic link to
/ruby, for convenience
Once in the Docker's shell, you can start hacking Ruby, then use
make to build
from the source, and for example, run
make btest make test-all make test-spec
You can also run
ruby/ is not mounted directly inside
/workdir to allow Docker to
manage both directories as separate volumes, respectively mounted to your host
ruby directory, and to a Docker volume that will backup build changes
Thanks to that, it is possible to hack at Ruby's source code from the host, using your favorite tool suite. Build steps only will have to happen inside the Docker container's shell.