Vagrant Alpine Linux by

Vagrant Alpine Linux

Last update: 3 years ago Tag : vagrant, alpine, rails

Wow, almost nine months dude...

Why vagrant and not docker? I'm using Mavericks, dude, and love simplicity, just one box and no setting, just vagrant up and ready. I use docker for another things, just not for my local development...

Why Alpine? Why not the popular Ubuntu based box?

Simple: Size and resource consumption.

Alpine linux is very small and light and fast. It only took a minute or two to download and setup a base box from scratch.

Anyway, here are some caveats of this very Linux:

  1. No VBGA yet for synchronisation, and I think will never be (VirtualBox Guest Addition). Compile VBGA in Alpine linux is nearly impossible, though I never try :D. Some people says use NFS, but nada! It has to use private network and in my case, still not working.
  2. My solution is using vagrant-sshfs plugin (vagrant plugin install vagrant-sshfs)
  3. In Vagrantfile, synced_folder condif, dd/change type: to "sshfs"
  4. In Apline linux, you must install sshfs package (and all its dependencies). Also important to note that you need to load fuse module to mount host folder. (echo fuse >> /etc/modules # as root)
  5. I'm using this box for learning Rails 5, so I need to install these: build-base, ruby-dev, libxml2-dev and all its dependencies. Usually if you don't install these development packages, you can't compile and install nokogiri, which is required by rails 5. You also need redis, postgresql/mariadb, and sqlite to begin to experiment with.
  6. Why Rails 5? Its ActionCable and Turbolinks are rocks!
  7. Why not Elixir/Phoenix/Go/Node? Its learning curve...
  8. Vagrant up/reload slightly/noticeably slower than other boxes with VBGA. No problem for me, I have a plenty of time...


Rails 5 can be installed, but actually any problem with rb-inotify, so currently a no go for alpine linux to handle Rails 5. Sad!

Share this post: