Sign inSign up

johnallen3d/ruby-dev

By johnallen3d

Updated about 7 years ago

A Docker image with basic tools (eg. pry) installed for quick one-off containers

Image
0

262

johnallen3d/ruby-dev repository overview

Docker Ruby Dev

A Docker image with basic tools (eg. pry) installed for quick one-off containers.

Usage

I normally source a shell function that creates a container with relevant files/directories mounted:

#
# Volume mounts in order:
#
# local folder into working directory
# pry config
# pry history
# bash history
# RubyGems credentials
# SSH credentials (git push)
# git configuration (sign commits)
# Gemfury and Heroku credentials
#
function docker-ruby() {
  docker run \
    -it \
    --rm \
    -w /usr/src/app \
    -v $PWD:/usr/src/app \
    -v $HOME/.pryrc:/root/.pryrc \
    -v $HOME/.pry_history:/root/.pry_history \
    -v $HOME/.bash_history:/root/.bash_history \
    -v $HOME/.gem:/root/.gem \
    -v $HOME/.ssh:/root/.ssh \
    -v $HOME/.gitconfig:/root/.gitconfig \
    -v $HOME/.netrc:/root/.netrc \
    johnallen3d/ruby-dev:latest "${@}"
}

Having this function sourced:

# drop into a Pry REPL with history and sourced configuration
> docker-ruby

# start a bash session with history
> docker-ruby bash

Tag summary

Content type

Image

Digest

Size

320.2 MB

Last updated

about 7 years ago

docker pull johnallen3d/ruby-dev