Public Repository

Last pushed: 2 years ago
Short Description
Updated version of ruby, currently using 2.1.5 - installed from source, fast n friendly!
Full Description

Updated version of ruby, currently using 2.1.5

contains help, installation from source, all path set up, bundler, thin, passenger, vim with syntax highlighting, gcc compiler
and packages like: screen, curl, wget, httpie and counting!

Contains a sample app in /www/app

It is recommended to run the app with thin or puma by adding it to the Gemfile of your app (rackup command should still work ok)

You should replace /www/app with your app dir and commit it to dockerhub (or on a personal docker hub), or better, create a Dockerfile that starts from this image and then does the following:

  • git clone your project
  • bundle install
  • execute rackup

and why not, some extra:


Install / Pull (first time usage)

docker pull makevoid/ruby2

Start / Restart [interactive version]

docker rm ruby2

docker run -p --name ruby2 -i -t makevoid/ruby2

Run the app insid the container (manually)

cd /www/app; rackup -o

visit http://yourhost.example:9292

(usually http://localhost:9292)

extra notes (not related):

remember to secure the box that runs docker by disabling ssh password auth with:

# vim /etc/ssh/sshd_config 
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no 
# then /etc/init.d/ssh restart

Sinatra benchmark on a 3.4 Ghz Xeon 4c / 8t (ovh sys ssd)
Added gem "thin" in bundle

Document Length:        368 bytes

Concurrency Level:      120
Time taken for tests:   2.529 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      575000 bytes
HTML transferred:       368000 bytes
Requests per second:    395.38 [#/sec] (mean)
Time per request:       303.509 [ms] (mean)
Time per request:       2.529 [ms] (mean, across all concurrent requests)
Transfer rate:          222.01 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   1.4      0       6
Processing:   110  289  31.8    300     345
Waiting:       85  264  33.0    276     319
Total:        110  290  31.3    300     347

Percentage of the requests served within a certain time (ms)
  50%    300
  66%    301
  75%    302
  80%    302
  90%    304
  95%    313
  98%    317
  99%    322
 100%    347 (longest request)
Docker Pull Command

Comments (0)