Rails Study, Day 4: Docker and Vagrant
Published on 29 Mar 2017
by Alexander Garber
I came for Rails, I'm working on DevOps.
The purpose of this post is to give an account of setting up my development environment in order to study Ruby on Rails.
I am already familiar with Vagrant, and initially thought I would spin an Ubuntu 16.04 box and work in that. However, the obvious and numerous disadvantages of working in a virtual machine on a local hard drive demanded that I find something better.
So I decided to finally invest some time on Docker, and I have to say, once I wrapped my head around the concept of containers, getting started seems fairly straightforward.
Initial Steps:
- Install Vagrant on my host
- Install Docker on my host
- Spin up an Ubuntu box in Vagrant
- Install Docker on my VM
- Create an account on Docker Hub
- Download the Heroku Cedar 16 image
- Create a private docker repository on my host
- Run the Heroku Docker image
- Push a modified Docker image to my own repository
- Pull the modified Docker image to my VM
And so forth.
As I want my development environment to mirror Heroku's settings as closely as possible, I decided to see what the Heroku website itself has to say on the matter.
My inclination was to keep it simple by using Vagrant, but Heroku's Cedar stack is available as a Docker image, so I will go with Docker instead. I've been meaning to familiarise myself with Docker for a while, so this works for me.
Official Notes for Docker are available from Gist.
This videos helps to demystify Docker.
I'm now looking into simplifying it further and using a Droplet from Digital Ocean.
all tags
activerecord android annoyances api apt arch array artix atom az3w backend bash blog browser bug callback career cli cloud code coding config configuration cp crud css database db design devops django email erp filter fugitive gif gist git gnome grep hebrew http ide isbn-fetcher iso javascript job search js kanban kanban\ kindle koans linux logger manjaro map markdown microservices mobi mtp neovim nodejs packages pastbin patch post python rails reduce refactoring rest routes rspec ruby scripting security sed shell sql string_replacement study tdd terminal testing version_control vim walkthrough workflow