aboutsummaryrefslogtreecommitdiff

DRuM: The Docker Ruby Manager

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.

Example

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

Bass Drums

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

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

Kick Drums

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

drum kick

Drum Pedal

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

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

Drum Rolls

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

drum roll
drum roll -- -p80:80

Snare Drums

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

drum snare

Drum Stick

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

Stick selection

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

  1. Is there a manually specified stick?
  2. Is it a rails app? (Run rails server)
  3. Is there an executable file with the same name as the working directory?
  4. Is there only one executable .rb file?
  5. Is there only one file that looks like “entrypoint”
  6. Is there only one executable file?

Manual Stick

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