rails / rails-dev-box

A virtual machine for Ruby on Rails core development
MIT License
2.05k stars 580 forks source link

Is there interest in a Docker-based setup? #179

Closed hovsater closed 5 months ago

hovsater commented 3 years ago

Hey 👋 A while ago I opened https://github.com/rails/rails/pull/40216. It added an alternative development environment based on Docker. It got closed with the reason that they're not interested in maintaining that in the official repository.

Would it be of interested here? I'd be happy to port it over and maintain it for what it's worth. 🙂

meinac commented 3 years ago

Hi @kevinsjoberg, I've built something similar in the past and recently updated it. Is this something you wanted to build? https://github.com/meinac/rails-dev-docker-compose

thiagovsk commented 2 years ago

@meinac tks!

for mac M1 users: we need use mariadb instead of mysql, because mysql docker image still not working in arm =/

alipman88 commented 2 years ago

I'm setting up rails-dev-box on a new M1 Macbook, and it seems like VirtualBox won't run on a non-AMD64 architecture.

This was easy to get around using the solution detailed here (I used Ubuntu 20.4 instead of 18.4, which ships with a more recent Ruby version): https://dev.to/taybenlor/running-vagrant-on-an-m1-apple-silicon-using-docker-3fh4

But unless there's an easy way to run VirtualBox on an M1 Mac, I think rails-dev-box needs to provide an alternate/universal dev environment. Migrating to Docker might make sense at this juncture.

hovsater commented 2 years ago

I believe my Docker setup still works for all use cases. I could give it some love if there's an interest. 🙂

fxn commented 2 years ago

My idea with the dev environment was: You don't even need Ruby, and you don't need to pollute your computer with system dependencies for bundle install to succeed: download, and ready.

It would be awesome to have the same experience with Docker Compose. Vagrant was the thing when I created this 10 years ago, but I believe nowadays people might feel more comfortable/familiar with Docker.

alipman88 commented 2 years ago

Both @meinac and @kevinsjoberg's projects feel like good starting points.

A few considerations:

autoconf
default-mysql-client
ffmpeg
git
imagemagick
libncurses5-dev
libtool
libxml2
libxml2-dev
libxslt1-dev
libvips
memcached (or libmemcached-tools if running memcached as a separate service)
mupdf-tools
mupdf
nodejs
poppler-utils
postgresql-client
rabbitmq-server
redis (or redis-tools if running redis as a separate service)
sqlite3
yarn

Lastly, another approach here: https://github.com/yahonda/multipass-rails-dev-box

aidanharan commented 5 months ago

A Rails development environment based on Docker is now available as part of Rails (see https://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#using-dev-container-cli).

yahonda commented 5 months ago

Closing this issue because Rails provides Docker based Rails development environment. https://github.com/rails/rails-dev-box/issues/179#issuecomment-1887380114