Tag: ruby

Add Seeds file after Dokku build

I am using dokku-alot to deploy my Rails 4 app to my staging server and everything is working just swell. One requirement I have with my current project is in regards to seed file data. I’ve had to keep my seeds.rb file out of version control because of sensitive information. However, I can’t figure out […]

Rails and Nginx on different Docker containers (how share data between containers)

I want to know if it’s possible (or even a good practice) to run a Rails app and Nginx on different Docker containers. My intention is to use one instance of Nginx to serve more than one application running in containers in the future. My question is because I will have to configure Nginx to […]

Rails Puma inside of Docker Instance stops responding from inactivity

I have a Docker file which correctly builds and runs a Rails Application. Everything works. As long as I keep sending traffic to the instance, it works. However, if I leave it idle for more than a couple of minutes, it stops responding. On the server, wget localhost: just gets stuck. wget localhost:8081 –2014-01-28 18:34:23– […]

Can I restart a docker container from within the container terminal?

I am making a Sinatra App inside a container, But whenever I want to see the changes I have to detach and run: docker restart <container_ID> to see the changes. Is there any way that I could restart the docker from within to see the changes? I cloned https://github.com/tcnksm-sample/docker-sinatra.git Build sudo docker build -t sinatra […]

How to edit files inside a docker container?

I cloned the docker–sinatra from Github (https://github.com/tcnksm-sample/docker-sinatra). Built the image using: sudo docker build -t sinatra . Run the container: sudo docker run -d -p 4567:4567 sinatra Everything works fine. Now I want to change the content of the application file inside the container. I tried to attach the container and open the application file […]

Chef-Client fails to get the ruby gem during chef provisioning

I am following the chef blog: https://www.chef.io/blog/2014/11/12/chef-provisioning-infrastructure-as-code/ On trying the command chef-client -z <myenv>.rb, it fails with the following exception Running handlers: [2015-05-12T08:58:25-07:00] ERROR: Running exception handlers Running handlers complete [2015-05-12T08:58:25-07:00] ERROR: Exception handlers complete [2015-05-12T08:58:25-07:00] FATAL: Stacktrace dumped to /scratch/ChefWorkstation/.chef/local-mode-cache/cache/chef-stacktrace.out Chef Client failed. 0 resources updated in 1.536536008 seconds [2015-05-12T08:58:25-07:00] ERROR: cannot load such […]

Unicorn error adding listener

I am having issues getting a unicorn server up and running. I try to run unicorn using: bundle exec unicorn -c /var/www/docninja/unicorn.rb -E development -D -p 8080 I get the following error: I, [2015-04-14T23:54:52.117609 #123] INFO — : listening on addr=/var/www/docninja/tmp/sockets/unicorn.docninja.sock fd=10 I, [2015-04-14T23:54:52.118624 #123] INFO — : listening on addr= fd=11 I, [2015-04-14T23:54:52.119553 #123] […]

How to get the docker containers information with Ruby and monitor it

I want to get the containers’ stats. eg: CPU, Memory I only know the command docker stats <CONTAINER NAME>, but when I type the command, it will be blocking in the foreground(like you typed top command) But I want get those information with Ruby. Then decide the action by those information, such as restart container […]

security-opt with docker-api gem

I want to use security-opt option with docker-api gem .How can I implement it. I have found nothing about it in docker-api documentation. Somebody please help.

Dockerfile fails when calling rbenv

I’m trying to create a Dockerfile that configures my ruby environment. But it is failing when I try to run docker run -it Dockerfile FROM centos:6.6 # VOLUME /var/lib/mysql # ENV HOME /root # ENV PATH $HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH # ENV SHELL /bin/bash RUN yum update -y RUN yum install git openssl-devel openssl readline-devel readline zlib-devel zlib […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.