Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting sample config for container development #1992

Open
wants to merge 5 commits into
base: master
from

Conversation

@alaxalves
Copy link
Contributor

alaxalves commented Mar 6, 2019

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 alaxalves requested a review from ruby/www-ruby-lang-org-editorial as a code owner Mar 6, 2019
@alaxalves alaxalves force-pushed the alaxalves:docker-setup branch from d14b56d to f6f0b01 Mar 6, 2019
@stomar
Copy link
Contributor

stomar commented Mar 9, 2019

(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?

@alaxalves
Copy link
Contributor Author

alaxalves commented Mar 10, 2019

@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.

@jcserracampos
Copy link
Member

jcserracampos commented Sep 10, 2019

@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.

…to docker-setup
@alaxalves
Copy link
Contributor Author

alaxalves commented Sep 10, 2019

@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!

README.md Outdated
to generate the website and start a local web server


Open [http://localhost:9292/](http://localhost:9292/)

This comment has been minimized.

@znz

znz Sep 11, 2019 Member

You can use <http://localhost:9292/> instead of [http://localhost:9292/](http://localhost:9292/).

services:
web:
container_name: ruby-lang
image: ruby:2.6.1

This comment has been minimized.

@yous

yous Sep 11, 2019 Member

Maybe this can be updated? It seems that 2.6.4 is available: https://hub.docker.com/_/ruby. Currently .travis.yml specified the version to 2.6.3.

This comment has been minimized.

@alaxalves

alaxalves Sep 11, 2019 Author Contributor

@yous do I use the same version as travis or do I update Travis to use 2.6.4 as well?

README.md Outdated Show resolved Hide resolved
Co-Authored-By: Júlio Campos <jcserracampos@gmail.com>
@jcserracampos
Copy link
Member

jcserracampos commented Sep 11, 2019

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

@alaxalves
Copy link
Contributor Author

alaxalves commented Sep 11, 2019

@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.

@jcserracampos
Copy link
Member

jcserracampos commented Sep 11, 2019

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.