Created
May 5, 2020 18:16
-
-
Save dunn/6dbd4015ee3d686c4dd8e1aa701af2d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dork () { | |
rubyversion=$(cat "$(pwd)/.ruby-version" | tr -d '\n') | |
rubystring="ruby" | |
if [[ "$rubyversion" != "" ]]; then | |
rubystring="ruby:${rubyversion}" | |
fi | |
imagename=$(echo "${rubystring}" | sed 's|\:|_|') | |
docker run --name "${imagename}" -v "$(pwd)":/app -w /app "${rubystring}" /bin/bash -c "$1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment