www.ruby-lang.org icon indicating copy to clipboard operation
www.ruby-lang.org copied to clipboard

Setting sample config for container development

Open alaxalves opened this issue 5 years ago • 7 comments

Added yaml file with sample docker configuration to make easier and faster developing to ruby-lang. Also added examples in README on how to use either Docker or Docker-Compose.

alaxalves avatar Mar 06 '19 01:03 alaxalves

(Someone else needs to review this PR, due to lacking knowledge about docker.)

Does this imply that I would run some third-party docker image on my system?

stomar avatar Mar 09 '19 07:03 stomar

@stomar The image used is in the docker-compose.yml and it is the official ruby image maintained by the Ruby Team Reference, so we wouldn't need to maintain any image. In order to test this out you must install Docker and Docker Compose. After you have those installed all you have to do is going to ruby-lang's root (where the docker-compose.yml file is located) and run on your terminal:

$ docker-compose up

After that, when you see the rake serve message go to localhost:9292/ on your browser and check if everything is ok. I have also added instructions in README to run ruby-lang only using docker here.

alaxalves avatar Mar 10 '19 15:03 alaxalves

@alaxalves Please, update your Gemfile.lock to use bundler 2.0 or greater.

When using the container the following is throw:

Starting ruby-lang ... done
Attaching to ruby-lang
ruby-lang | You must use Bundler 2 or greater with this lockfile.
ruby-lang | You must use Bundler 2 or greater with this lockfile.
ruby-lang exited with code 20

See https://github.com/jekyll/jekyll/issues/7463 for more information.

jcserracampos avatar Sep 10 '19 13:09 jcserracampos

@alaxalves Please, update your Gemfile.lock to use bundler 2.0 or greater.

When using the container the following is throw:

Starting ruby-lang ... done
Attaching to ruby-lang
ruby-lang | You must use Bundler 2 or greater with this lockfile.
ruby-lang | You must use Bundler 2 or greater with this lockfile.
ruby-lang exited with code 20

See jekyll/jekyll#7463 for more information.

It's done!

alaxalves avatar Sep 10 '19 16:09 alaxalves

@alaxalves Saying to access through localhost is incorrect, is not? I am a macOS user and I only can access via docker-machine ip.

jcserracampos avatar Sep 11 '19 17:09 jcserracampos

@alaxalves Saying to access through localhost is incorrect, is not? I am a macOS user and I only can access via docker-machine ip.

I think that you have an specific use case. For what I'm aware of latest Docker CE doesn't use a VM to "simulate" a Docker environment on MacOS anymore, now it uses the host's kernel, as in linux systems. Thus you can access your containerized service through localhost.

alaxalves avatar Sep 11 '19 17:09 alaxalves

@alaxalves Saying to access through localhost is incorrect, is not? I am a macOS user and I only can access via docker-machine ip.

I think that you have an specific use case. For what I'm aware of latest Docker CE doesn't use a VM to "simulate" a Docker environment on MacOS anymore, now it uses the host's kernel, as in linux systems. Thus you can access your containerized service through localhost.

I use kyperkit and can not use localhost.

jcserracampos avatar Sep 11 '19 18:09 jcserracampos