h1. DRuM: The Docker Ruby Manager

p. This is a TERRIBLE alternative to RVM, that uses docker, because why not. You need to be root or have sudo or be in the docker group, because docker.

h2. Example

bc. cd example
drum bass
drum kick
drum roll -- -p80:80
drum snare

h2. Bass Drums

p. Just a ruby image of some form. By default, ruby:alpine.

bc. drum bass          # ruby:alpine
drum bass slim     # Just a tag, ruby:slim
drum bass jruby:   # Just an image, jruby:latest
drum bass ruby:2.6 # Image and tag, ruby:2.6

h2. Kick Drums

p. A Kick Drum is a Bass Drum with your gems and drum pedal installed.

bc. drum kick

h3. Drum Pedal

p. A Drumpedal file is a Dockerfile excerpt which gets executed right before your gems are installed.

bc. cat >Drumpedal <<EOT
RUN apk update
RUN apk upgrade
RUN apk add build-base sqlite
EOT

h2. Drum Rolls

p. This beats on the Kick Drum with your current directory mounted as a volume. For dev.

bc. drum roll
drum roll -- -p80:80

h2. Snare Drums

p. A Snare Drum is a Kick Drum with your application fully installed, ready for deployment to production.

bc. drum snare

h2. Drum Stick

p. A Drum Stick is how you beat on the Drum. You needn't actually specify the Drum Stick, drum tries to be clever.

h3. Stick selection

p. Drum will try the following sticks in order, and use the first that matches.

# Is there a manually specified stick?
# Is it a rails app? (Run rails server)
# Is there an executable file with the same name as the working directory?
# Is there only one executable .rb file?
# Is there only one file that looks like "entrypoint"
# Is there only one executable file?

h3. Manual Stick

bc. drum stick ./example.rb
drum stick ruby example.rb
drum stick rails server
drum stick                 # Returns what drum will use as the stick
