Skip to content

Scripts for using a Rails development environment with Docker and Docker Compose

License

Notifications You must be signed in to change notification settings

djmaze/rails-dev-env-with-docker-and-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Installation

  • Optionally, install docker-ssh-agent-forward if you need to install private gems or deploy via SSH.

  • Copy the script bundle-package-all-with-docker into your path:

    curl -sL https://github.com/djmaze/rails-dev-env-with-docker-and-compose/raw/master/bundle-package-all-with-docker | sudo tee /usr/local/bin/bundle-package-all-with-docker 1>/dev/null
    sudo chmod +x /usr/local/bin/bundle-package-all-with-docker
    

Getting started with an existing app

(Note: You have to prefix all commands with sudo -E if you need to run Docker as root).

  • Use the ruby base image (with the version needed) in your Dockerfile.

  • In your project directory, fetch all gems one-time:

      bundle-package-all-with-docker
    
  • Then do a docker build as usual.

You need to re-run bundle-package-all-with-docker when your Gemfile is changed.

Setting up a new rails app

In a new directory, run:

touch Gemfile
bundle-package-all-with-docker
gem install rails
rails new

Using Docker Compose

TBD

About

Scripts for using a Rails development environment with Docker and Docker Compose

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages