Docker -- who's using it, what's the best starting image for Rails deployment?

15 views
Skip to first unread message

Walter Lee Davis

unread,
Mar 5, 2015, 10:16:56 AM3/5/15
to phil...@googlegroups.com
Subject says it all. Penn is interested in using Docker as a deployment strategy, and I wanted to come up to speed on this. Be gentle, it's my first time.

Walter

Brian Auton

unread,
Mar 5, 2015, 1:08:04 PM3/5/15
to phil...@googlegroups.com
I have a few Rails apps deployed with Docker. Still in the process of figuring out the best setup to allow for easy troubleshooting, redeployment, etc. Also in the process of learning about CoreOS, which integrates well with Docker and provides cluster-level orchestration support that's missing from Docker by itself.

For Rails-ready images, I've been using the ones published by Phusion (https://github.com/phusion/passenger-docker). They come with an init system built in, which solves some OS-level problems that occur when you're running a webserver as a process by itself in a Docker container (see their base image README for a good explanation of this: https://github.com/phusion/baseimage-docker).

On Thu, Mar 5, 2015 at 10:16 AM, Walter Lee Davis <wa...@wdstudio.com> wrote:
Subject says it all. Penn is interested in using Docker as a deployment strategy, and I wanted to come up to speed on this. Be gentle, it's my first time.

Walter

--
You received this message because you are subscribed to the Google Groups "Philly.rb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phillyrb+u...@googlegroups.com.
To post to this group, send email to phil...@googlegroups.com.
Visit this group at http://groups.google.com/group/phillyrb.
For more options, visit https://groups.google.com/d/optout.

Walter Lee Davis

unread,
Mar 5, 2015, 1:21:02 PM3/5/15
to phil...@googlegroups.com
Thanks, Brian.

Walter

Paul Jungwirth

unread,
Mar 5, 2015, 1:44:38 PM3/5/15
to phil...@googlegroups.com
Hi Walter,

> Subject says it all.

I've only experimented with Docker and not used it in production (I've
done a lot of Chef work though), so hopefully more knowledgeable people
will chime in. But in the meantime:

- You should know that Docker does not provide the same isolation
guarantees as a full VM, which is important for security reasons at
least. It may get there in the future, but it's not there yet.

- My understanding is the Phusion approach (of Docker'ing the init
process to cram several services into one Docker image) is discouraged
by the Docker community, although personally when I read Phusion's
writeup it made a lot of sense to me and solved some of my biggest
doubts about using Docker for Rails apps. (I'd love to hear how people
are using Docker for Rails without taking this approach.)

- One of the biggest attractions of Docker to me is pushing image
updates that are just diffs rather than huge files. Right now I'm
supporting a (very weird) deployment scenario where we push Vagrant .box
files that can be over 1G, and it's super annoying sending around files
that large.

Good luck!

Paul

Jason Blanchard

unread,
Mar 5, 2015, 1:46:11 PM3/5/15
to phil...@googlegroups.com
Hey Walter,

We've (https://www.apprennet.com) been deploying our Rails app to production via docker for a few weeks now, and things have been going well.

We wrote our own deploy script in bash orchestrated by sshkit, but it was heavily influenced by this presentation and example repo https://www.youtube.com/watch?v=QZVYP3cPcWQ

We bundle our app source into an image built from passenger-docker https://github.com/phusion/passenger-docker, keep it in a private dockerhub repo, and that's what gets pulled onto the app servers.

Let me know if you have any other specific questions, I'm happy to chat about it more.
// Jason
Reply all
Reply to author
Forward
0 new messages