Skip to content

Instantly share code, notes, and snippets.

@masarakki
Last active November 11, 2018 17:18
Show Gist options
  • Save masarakki/ac2f94f0a8ddce7b26732eea9b011579 to your computer and use it in GitHub Desktop.
Save masarakki/ac2f94f0a8ddce7b26732eea9b011579 to your computer and use it in GitHub Desktop.
ruby via docker
# docker-ruby
#!/bin/bash
RUBY_VERSION=`cat $PWD/.ruby-version | tr -d '[[:space:]]'`
IMAGE=ruby:$RUBY_VERSION
VOLUMES="-v $HOME:$HOME"
ENVIRONMENTS="-e HOME:$HOME"
exec docker run -it $VOLUMES $ENVIRONMENTS -u `id -u`:`id -g` -w `pwd` $IMAGE $@
# docker-node
#!/bin/bash
VOLUMES="-v $HOME:$HOME"
ENVIRONMENTS="-e HOME:$HOME"
exec docker run -it $VOLUMES -u `id -u`:`id -g` $ENVIRONMENTS -w `pwd` node $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment