Public Repository

Last pushed: 2 years ago
Short Description
A rough draft on a rails/mysql development sandbox container
Full Description

First create a railsproject folder:

mkdir $HOME/railsprojects

Pull the image:

sudo docker pull jinro79/rails-4.1.8:mysql

Run the docker image:

sudo docker run -v="$HOME/railsprojects":"/railsprojects" -i -t -p 3000 jinro79/rails-4.1.8:mysql /bin/bash

You should now be in the container, an easy way to tell is if the prompt has changed to "root@somerandomnumbers:#/"

use the ifconfig command and take note of the ip address.

Try to run the myapp rails app:

cd  /railsprojects/myapp
rails server

if you get the following error

Could not find rake-10.4.2 in any of the sources Run bundle install
to install missing gems.

run the command: bundle install

Rebuild the database by running the commands:

rake db:create
rake db:migrate
rails server

Open your web browser in your host machine and point your browser to {docker.ip}:3000

I also created a simple posts object so you can go to {docker,ip}:3000/posts.

Docker Pull Command
Owner
jinro79

Comments (0)